The only limitation of this
approach is that there may be some applications that won??™t display properly (and possibly won??™t be usable)
at high DPI settings. By default, Use Windows XP Style DPI Scaling is checked for DPI sizes of 120 or less but
unchecked for DPI sizes that are greater.
Bitmap and Vector Graphics
When you work with ordinary controls, you can take WPF??™s resolution independence for
granted. WPF takes care of making sure that everything has the right size automatically. However,
if you plan to incorporate images into your application you can??™t be quite as casual. For
example, in traditional Windows applications, developers use tiny bitmaps for toolbar commands.
In a WPF application, this approach is not ideal because the bitmap may display
artifacts (becoming blurry) as it??™s scaled up or down according to the system DPI. Instead,
when designing a WPF user interface even the smallest icon is generally implemented as a
vector graphic. Vector graphics are defined as a set of shapes, and as such they can be easily
scaled to any size.
nNote Of course, drawing a vector graphic takes more time than painting a basic bitmap, but WPF
includes optimizations that are designed to lessen the overhead to ensure that drawing performance is reasonable
for any business application and most consumer-oriented ones as well.
Pages:
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92