One of the biggest issues I've had with developing custom views is that there are so many different ways to implement your styling and linkage. The best way I've found is just to call the following in the constructor:
SetResourceReference(StyleProperty, typeof(MyControl));
Wherein MyControl is the control you're working with.
A lot of people work with the default style key -- but I've found that in larger projects, there can sometimes be issues with this. Using SetResourceReference has worked for me every single time.
Food for thought!
No comments:
Post a Comment