I am creating some custom controls in WPF and need to therefore create the default control templates for them. To help in this process I would like to see the XAML of the control templates for the builtin controls as a reference.
I can open up the PresentationFramework.Class dll into .NET Reflector but cannot find anything inside it of use. It seems to have only BAML but not the original XAML.
Is this available online somewhere? Or is there a tool that can extract it?
If you have Expression Blend installed several themes, including classic.xaml, can be found in
C:\Program Files\Microsoft Expression\Blend 3\SystemThemes\Wpf
If you need to build new templates the sample control templates at http://msdn.microsoft.com/en-us/library/aa970773.aspx are often a better starting point.
The actual themes included with WPF are not designed to be extendable or understandable
The BAML to XAML Viewer add-in for Reflector can extract the BAML, convert it to XAML and you can also save it to file.
Check out StyleSnooper. It allows you to pick any of the inbuilt controls and dump out the default style xaml.
(You can also do this from Expression Blend if you have it.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With