tags:

views:

883

answers:

2

I've just started developing a WPF application. This is not my first WPF app, but it will be the first that needs some polish. I know quite a bit about the "plumbing" of WPF such as binding, etc., but very little about how to polish it up. I don't need a snazzy UI. I just need something that looks like a native Windows app. For instance, if the app runs on XP, I want it to look like an XP app and pick up the user's UI theme. Same thing on Vista, etc.

How can I do this?

+1  A: 

You should be able to put this into the application's OnLoad event to use the Vista theme, for example:

Uri uri = new Uri("PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\\themes/aero.normalcolor.xaml", UriKind.Relative); 

Resources.MergedDictionaries.Add(Application.LoadComponent(uri) as ResourceDictionary);

or for the Windows XP theme: themes/Royale.normalcolor.xaml

Pwninstein
+1  A: 

You don't have to do anything - WPF does it for you.

EDIT: It does. Run it with Aero/Luna and then Classic.

The Alpha Nerd
My problem ended up being with the Window background.
Gregory Higley