Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOW-TO: Enable XP/Vista/Windows 7 look in WPF applications.

 
Subscribe to the RSS feed for this forum  Forum Index -> Shell MegaPack.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Tue Aug 11, 2009 10:17 am    Post subject: HOW-TO: Enable XP/Vista/Windows 7 look in WPF applications.

When using the WPF edition controls, to turn on native look of whatever OS the controls are running on, you need to add a application manifest file to your assembly.

For C# projects do this via Add New Item-->General-->Application Manifest file.

Then add the following snippet (shown in bold) near the end of the manifest file just before the end of the 'asmv1' tag:

.........
.........
.........
<dependency>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Windows.Common-Controls" version="6.0.0.0" type="win32" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>

</asmv1:assembly>

This instructs the application to use the latest Common Controls v6.0 which have the native OS look.

For Visual Basic.Net projects, bring up Project Properties, click the 'Application' tab, then click the 'View UAC Settings' button. This adds the application manifest file (app.manifest) to your project and opens it for editing. Then add the snippet show above in bold near the end of the manifest file just before the end of the 'asmv1' tag.
Back to top
Display posts from previous:   
Forum Index -> Shell MegaPack.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group