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

Posted on 2012-08-23
Last Modified: 2012-08-24

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

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

Question by:jxbma
    LVL 25

    Accepted Solution

    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.


    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.
    LVL 1

    Author Closing Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
    For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now