Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find WPF Classic Theme as XAML? [closed]

Tags:

wpf

xaml

themes

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?

like image 585
Phil Wright Avatar asked Sep 21 '09 10:09

Phil Wright


4 Answers

If you have Expression Blend installed several themes, including classic.xaml, can be found in

C:\Program Files\Microsoft Expression\Blend 3\SystemThemes\Wpf

like image 139
ChrisF Avatar answered Oct 22 '22 21:10

ChrisF


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

like image 30
Nir Avatar answered Oct 22 '22 23:10

Nir


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.

like image 27
Daniel May Avatar answered Oct 22 '22 22:10

Daniel May


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.)

like image 2
Simon P Stevens Avatar answered Oct 22 '22 23:10

Simon P Stevens