ControlTemplate for existing controls in WPF ControlTemplate for existing controls in WPF wpf wpf

ControlTemplate for existing controls in WPF


Check out StyleSnooper:

enter image description here

It will dump out the standard styles (and therefore templates too) for the built in controls. You can also load in a specific DLL that contains WPF controls and view the default styles for those too.


The styles along with template examples are up on MSDN for download, see the Default WPF Themes link.

However you can also extend the existing style without redefining everything by using the BasedOn attribute.


If you have Expression Blend you can:

  1. Drag the control onto the design surface
  2. Right click the control and choose Edit Template -> Edit Copy

When you do this, Blend will extract the base template from the control and explicitly declare it within document/application as a resource which you can then edit to your liking. You can do this for any control.