I’m creating a WPF application (which is also MVVM based), what should I consider when deciding whether to inherit and create a Custom Control vs creating a new style template for that control.
I should note that all my modified controls should later be used by other developers who will receive them as a separate assembly.
For example – a Watermark Textbox: You can create a Custom Control or create a new style (notice both are from the same blog…).
Are there any “rules of thumb” to help decide on one way vs the other?
Usually you would inherit to add functionality and change templates to change appearance. So if it does something more than the original control i would use a sub-class. (Of course you can also extend functionality via a template to some extent but that is somewhat beside the point.)