Scaling

Although scrolling is a popular and long-standing way to deal with large content, dynamically shrinking or enlarging content to “just fit” in a given space is more appropriate for several scenarios. For example, it doesn’t make sense for most games to change the shape of their game surface. Whether the game board or playing field must maintain a specific aspect ratio, or you want to avoid giving widescreen players an unfair advantage by seeing more of the scrolling world ahead, the typical approach is to scale up the game surface as much as possible and use letterboxing to fill any extra space (or perhaps show extra UI elements like game stats). If your app uses vector graphics, then you can scale to your heart’s content. If it uses bitmaps, ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.