I created a resource file as 'Style' which sets the fillcolor and border of a rectangle. In 'code' I create a rectangle which is dynamic in size as it's being set by another rectangle size.
What I want is to create the code-based rectangle and have its style set by the resource xaml-file.
How can I do this other then to set it by code. If possible I don't want to use XamlReader.