• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2552
  • Last Modified:

Is there a WPF equivalent for EnableVisualStyles() and SetCompatibleTextRenderingDefault()?

Hi:

I'm currently working on migrating a Winforms based application to WPF.

I was wondering if there was  WPF equivalent for EnableVisualStyles() and SetCompatibleTextRenderingDefault()?

Thanks,
JohnB
0
jxbma
Asked:
jxbma
1 Solution
 
Luis PérezSoftware Architect in .NetCommented:
For EnableVisualStyles, you can still use it without any restriction, but realize that it's in the System.Windows.Forms.Application class, not the System.Windows.Application class. So maybe you'd need to add a reference to System.Windows.Forms assembly.

System.Windows.Forms.Application.EnableVisualStyles()

And about SetCompatibleTextRenderingDefault(), I guess there's no equivalent. Note that SetCompatibleTextRenderingDefault() is used in Windows Forms to set for a control if it must use GDI or GDI+ to render the text. But in WPF all drawing is done by DirectX, so as far as I know no GDI is used at all.

Hope that helps.
0
 
jxbmaSoftware ConsultantAuthor Commented:
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now