WPF Web Browser Control and DPI Scaling

后端 未结 4 1807
星月不相逢
星月不相逢 2021-02-07 06:50

I\'m working with a WPF application that uses the Web Browser control and I\'m having issues with High DPI scaling.

It looks like the Web Browser control is not properl

4条回答
  •  孤城傲影
    2021-02-07 07:05

    I have found what I think is the best way to achieve the required functionality (provided, that you anyway need to specify FEATURE_BROWSER_EMULATION in registry to use most recent IE version).

    All you need to do, is to create a new key in HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl named FEATURE_96DPI_PIXEL and add your executable entry there of type DWORD (32-bit), with application exe as a key name and value of 1.

    Check the setting on startup of the application, before actually instantiating the WebBrowser component and you should be fine.

    Original post (with other possible features): https://www.reddit.com/r/dotnet/comments/2j5m6m/wpf_webbrowser_control_alternatives/

提交回复
热议问题