wpf - Which one is better? Style or User Control?
- by Archie
Hello,
I wanted to know which one amongst Style and UserControl would be better to use in WPF?
For example:
I have created an image button in two different ways.
One uses Style and ContentTemplate property is set.
It uses one other class with dependency properties.
The other way is i have created a UserControl which has a button and its content property is set.
UserControl.xaml.cs file also contains the dependency properties.
For Code details see the answers of this question:
http://stackoverflow.com/questions/2734825/custom-button-template-in-wpf
Which one would be better to use? Can anyone tell me in which scenario one should go for Style or UserControl or any CustomControl?
Thanks in advance.