Reputation: 2104
I want to create simple custom control (derived from control and with look defined in generics.xaml). I need to change size of elements defined in generic.xaml, when control is resized! It would be great to write some of that generic.xaml part in C#. Is that possible? Or is there a way to create MVVM like custom control? What i am willing to create is simple blinking led control (on,blinking, off).
Upvotes: 0
Views: 536
Reputation: 178780
There's more than one question in your post, but I'll answer the pertinent one: can you supplement your generic.xaml with code.
The answer is yes. Simply add generic.xaml.cs and marry the two up the same way UserControls are. That is:
ResourceDictionary
Upvotes: 1