High DPI Support in a Windows Forms Application
In This Article
Before you run an XAF Windows Forms application in a high-DPI environment, ensure that the application is DPI-aware.
To ensure that an application has proper high DPI support, the Solution Wizard adds the following application settings section to the YourApplicationName.Win\App.config file every time you create a new project:
XML
<applicationSettings>
<DevExpress.LookAndFeel.Design.AppSettings>
<setting name="DPIAwarenessMode" serializeAs="String">
<value>System</value>
</setting>
</DevExpress.LookAndFeel.Design.AppSettings>
</applicationSettings>
To enable DPI-Aware mode manually, use one of the techniques described in the following topic: High DPI Support.
#SVG Images
All applications created with the Solution Wizard support SVG images.
To enable support for SVG images manually, go to the Program.cs (Program.vb) file. In the Main
method call, set the UseSvgImages property to true
.
#Current Limitations and Recommendations
- Design your applications under 96 DPI (100%). When you downscale a form developed in a high-DPI environment, issues may occur.
- XAF does not support Per-Monitor DPI. When you drag an application window between monitors with different DPI settings, the operating system uses its built-in mechanisms to scale the window accordingly.
See Also