Using the Cefsharp control, in some high-resolution computers (showing a scale of not 100%, but 120% or 125%, etc.), the following situations occur:
A black edge appears in the displayed page, and the button is also biased, such as clicking on the "Layers" button and clicking on the relative position in the black border above.
Solution:
1, in the current computer desktop, right-display settings, the display scale adjustment to 100% (need to restart the computer to take effect), then look, the display is normal;
2, in the current project, add an "application manifest file" (app.manifest), under the root node (assembly), add the following code, rerun the program, and Method 1 is the same effect:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
3, the use of cefsharp self-bringing method:
Find Cef.initialize (setting); statement, under which add cef.enablehighdpisupport ();
When the program loads the Chromiumwebbrowser control, it adjusts the current display scale to 100%.
Cef.Initialize(setting);
Cef.EnableHighDPISupport();
Preference for "Method 3"
Resolution of the Cefsharp high DPI problem