O'Reilly logo

Microsoft® Mobile Development Handbook by Peter Foot, Daniel Moth, Andy Wigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling Different Resolutions

In the section titled Scaling Images earlier in this chapter, you learned how to scale an image to fit the display area. That solution used the ClipRectangle property of the PaintEventArgs object to determine the size of the area being repainted, and so works well on a standard 176 x 220 pixel smartphone display and also on a 240 x 320 pixel QVGA display.

However, the code shown previously in the section titled Drawing Images, Text, and Shapes is not optimized for different resolutions. The pen width of 4 and font size of 10 display well on the standard smartphone (as shown in Figure 12-3), but the text looks a little bit small when displayed on the QVGA device. That is because the QVGA device displays text and

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required