3

I want to look into the default styles that are used for the default WPF application so that I can experiment/tweak them. (I believe this to be the standard AERO theme)

So I downloaded the default themes from Microsoft, and manually applied the AERO theme.

  • I added the "Aero.NormalColor.xaml" file into my project
  • I then added "PresentationUI.dll" and "PresentationFramework.Aero.dll"
  • I then modified the namespace from "xmlns:theme="clr-namespace:Microsoft.Windows.Themes;" to "xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" (It was throwing errors otherwise)
  • Finally I add it into the Apps resource dictionary

But it ends up looking slightly different, in particular, menus seem to look different. So I guess I'm running the wrong theme.

This is using VS 2010 and the default new .net4 WPF application project

Community
  • 1
  • 1
wforl
  • 843
  • 10
  • 22
  • 1
    If you want to customize the default `Style` for a Control, why not just create an element of that type in xaml -> right click on it in "Document Outline" in VS and choose "Edit Template"->"Edit a Copy"? – Viv Aug 24 '13 at 20:23
  • Because I want to inspect the AERO theme as a whole, ..see how everything ties together, .. see how it produces the effects it does etc – wforl Aug 24 '13 at 21:28
  • Why not just look at the xaml? – Gayot Fow Aug 25 '13 at 00:07

1 Answers1

-1

Those default themes you downloaded could be god knows what. Probably not what is shipped with the actual .NET framework and Windows.

I don't know what your end goal is, but I would suggest looking at the XAML of a specific control you are interested in Blend. It was a pretty simple action, something like right click -> edit control template, although I can't remember the exact steps (like where to click exactly etc). I'm sure you can google that information very quickly...

Marko
  • 2,266
  • 4
  • 27
  • 48