Forcing a theme in .NET 4.0 only half works

Aug 15, 2011 at 10:38 PM

I need to force the use of PresentationFramework.Classic theme.  I have added a reference to it into my .NET 4.0 window control (which is invoked from an unmanaged dll).

I tried by adding the resource by just specifying it -- and then adding in the version and the public key.  When I run it, my button controls look like windows classic. However, my window still has the Windows 7 theme. The listview still has the windows 7 theme.

 <Window.Resources>
        <ResourceDictionary Source="/presentationframework.classic;component/themes/classic.xaml"/>
    </Window.Resources>

OR the following...I get the same results...Buttons look like windows classic. The window and listview still look like windows7.

 <Window.Resources>
        <ResourceDictionary Source="/presentationframework.classic;V4.0.0.0;31bf3856ad364e35;component/themes/classic.xaml"/>
    </Window.Resources>