Prev | Current Page 75 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"


Here, the pixel density drops to about 85 dpi, so the 96-by-96 pixel button appears slightly
larger than 1 inch.
In both these cases, if you reduce the screen size (say, by switching to 800 by 600 resolution),
the button (and every other screen element) will appear proportionately larger. That??™s
because the system DPI setting remains at 96 dpi. In other words, Windows continues to
assume it takes 96 pixels to make an inch, even though at a lower resolution it takes far fewer
pixels.
CHAPTER 1 n INTRODUCING WPF 7
nTip As you no doubt know, LCD monitors are designed with a single resolution, which is called the native
resolution. If you lower the resolution, the monitor must use interpolation to fill in the extra pixels, which can
cause blurriness. To get the best display, it??™s always best to use the native resolution. If you want larger windows,
buttons, and text, consider modifying the system DPI setting instead (as described next).
System DPI
So far, the WPF button example works exactly the same as any other user interface element in
any other type of Windows application. The difference is the result if you change the system
DPI setting. In the previous generation of Windows, this feature was sometimes called large
fonts. That??™s because the system DPI affects the system font size, but often leaves other details
unchanged.


Pages:
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87