-
I'm implementing CefSharp version 103.0.80.0 in my Winforms .net framework 4.8 app. I need to enable high dpi because otherwise there's a black border on the top and left of the browser control. I put Cef.EnableHighDPISupport() by my app startup, and I also added an app.manifest file with the following:
The black border disappears, but all of the popup forms in the app look strange, for example textboxes and buttons are getting cut off. Is there any way to make the high dpi only affect the browser control, not the whole form/app? I've gone through https://github.com/cefsharp/CefSharp/wiki/General-Usage#high-dpi-displayssupport several times but haven't been able to fix this. I've run the MinimalExample but since it only has the web browser as a control and no other popups, I couldn't see if it works the same way. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
As you are using .Net 4.8 the suggested application is to configure DPI awareness in the app.config
As per https://github.com/cefsharp/CefSharp/wiki/General-Usage#appmanifest Remove the app.manifest entry and the call to Cef.EnableHighDPISupport() and use the app.config approach detailed at High DPI support in Windows Forms
There's more to read below the WPF section, make sure to read https://github.com/cefsharp/CefSharp/wiki/General-Usage#high-dpi-additional-info |
Beta Was this translation helpful? Give feedback.
As you are using .Net 4.8 the suggested application is to configure DPI awareness in the app.config
As per https://github.com/cefsharp/CefSharp/wiki/General-Usage#appmanifest
Remove the app.manifest entry and the call to Cef.EnableHighDPISupport() and use the app.config approach detailed at High DPI support in Windows Forms