Using SetWindowTheme() on controls in WindowsFormsHost in WPF?
Posted
by Eric Smith
on Stack Overflow
See other posts from Stack Overflow
or by Eric Smith
Published on 2009-10-18T02:53:16Z
Indexed on
2010/05/07
0:08 UTC
Read the original article
Hit count: 1071
I have an application I'm developing which closely mirrors Windows 7's Device Stage. In Device Stage, beneath the main banner there is a ListView containing actions embodied as ListViewItems.
In my WPF application, I used WindowsFormsHost to host a WinForms ListView so that I could use SetWindowTheme()
on it and apply Windows Vista/7 styling to it.
This, however, does not work and doesn't achieve the same effect it does when used in Windows Forms.
How can I achieve the Windows 7 look on a ListView in WPF? I'm not looking to create a custom style then apply it because frankly that's too much of a pain in the ass to continue using WPF for this app.
Thanks! :)
© Stack Overflow or respective owner