#267 – Think Twice Before You Subclass a Control

In Windows Forms, when you wanted behavior in a control beyond what the standard controls provided, you’d subclass a specific control, subclass the Control class, or create a custom UserControl.

In WPF, you often don’t need to subclass a control or create a custom UserControl.  Through the use of styles and templates, you can generally customize the behavior of an existing control to meet the needs of your application.

 

Follow

Get every new post delivered to your Inbox.

Join 368 other followers