Exercise 2: Run the Application at the 144 DPI SettingIn this exercise, you run the application at the 144 DPI setting, and then compare the UI elements to those at the 96 DPI setting. Task 1 - Run the Application at the 144 DPI Setting
Task 2 - Compare the UI at the 144 DPI Setting to the 96 DPI SettingThe following screen shot shows how the UI of the application looks when running at the 96 DPI setting.
The following table summarizes the appearances of the application UI at the 144 DPI setting as compared to at the 96 DPI setting.
Note:
Help
Notice that the application is blurry, the text is clipped, and the sizes of the buttons and window frame are increased. This is because the application is incompatible with the default scaling offered by DPI virtualization.
With DPI set to 144, the operating system automatically enables DPI virtualization. Microsoft introduced the concept of DPI virtualization Windows Vista®. It is also known as DPI scaling, which means to scale the text and window size of the applications that are not DPI-aware.
When your application relies solely on DPI virtualization to scale its UI elements, it might produce visual artifacts due to potential incompatibility with the DPI scaling. The preceding sample demonstrated that. To fix the problem, you need to opt out of the DPI virtualization programmatically by declaring your application as DPI-aware.
For applications you have already deployed, you can manually opt them out of the automatic DPI virtualization. For more information about how to do this, see the Appendix: Manually Opting Out of DPI Virtualization.
|