Per-Monitor and Per-Monitor (V2) DPI Awareness Effectively, System DPI-aware desktop applications only render crisply at a single display scale factor, becoming blurry whenever the DPI changes. When the application is moved to a display with a different scale factor, or if the display scale factor otherwise changes, Windows will bitmap scale the application's windows, making them appear blurry. As such, System DPI-aware applications are not DPI scaled (bitmap stretched) by Windows on displays rendering at that single DPI. During initialization, they lay out their UI appropriately (sizing controls, choosing font sizes, loading assets, etc.) using that System DPI value. System DPI Awarenessĭesktop applications that are system DPI aware typically receive the DPI of the primary connected monitor as of the time of user sign-in. This results in the application appearing blurry. Whenever these applications are run on a screen with a display scale greater than 96 DPI, Windows will stretch the application bitmap to the expected physical size. By setting one of the following available DPI awareness modes, applications can explicitly tell Windows how they wish to handle DPI scaling: DPI UnawareĭPI unaware applications render at a fixed DPI value of 96 (100%). By default, the system considers desktop applications DPI unaware and bitmap-stretches their windows. DPI Awareness Modeĭesktop applications must tell Windows if they support DPI scaling. Desktop applications that don't do this extra work to respond to DPI changes may appear blurry or incorrectly-sized to the user. By default, and without additional developer work, desktop applications do not. In these scenarios, UWP applications redraw themselves for the new DPI automatically. Making a display-scale-factor settings change while applications are running.Connecting via Remote Desktop from a high DPI laptop/tablet to a low-DPI device (or vice versa).Docking and undocking a high DPI laptop with a low-DPI external display (or vice versa).Multiple-monitor setups where each display has a different scale factor and the application is moved from one display to another (such as a 4K and a 1080p display).Some common scenarios where the display scale factor/DPI changes are: This assumption no longer holds true, with display DPIs commonly changing several times throughout an application process's lifetime. Most legacy desktop UI frameworks have built-in assumptions that the display DPI will not change during the lifetime of the process. In the past, most displays had 96 pixels per linear inch of physical space (96 DPI) in 2017, displays with nearly 300 DPI or higher are readily available. This has resulted in the dots per inch (DPI) of modern display panels being much higher than they have historically been. Display Scale Factor & DPIĪs display technology has progressed, display panel manufacturers have packed an increasing number of pixels into each unit of physical space on their panels. ![]() ![]() This document provides context and information about what is involved in updating a desktop application to render correctly. Without such work, applications will appear blurry or incorrectly-sized in many common usage scenarios. UWP applications automatically-and dynamically-scale for each display that they're running on.ĭesktop applications using older Windows programming technologies (raw Win32 programming, Windows Forms, Windows Presentation Framework (WPF), etc.) are unable to automatically handle DPI scaling without additional developer work. To start, if you're creating a new Windows app from scratch, it is highly recommended that you create a Universal Windows Platform (UWP) application. This content is targeted at developers who are looking to update desktop applications to handle display scale factor (dots per inch, or DPI) changes dynamically, allowing their applications to be crisp on any display they're rendered on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |