Image Sizing

The size of an image control either can be set explicitly using its Width and Height properties, or the image can depend on its container to determine its size. If the container is a simple container such as a Canvas, the Image will be displayed using the native dimensions defined in the image file. The Image.Stretch property is used to control the sizing behavior of the Image when its size differs from its native image size. The Stretch property is of type System.Windows.Media.Stretch, whose values are described in Table 7.1.

TABLE 7.1. Stretch Enum Values and Their Effect on Image Sizing

Image

The effects of each of these enum values ...

Get Windows® Phone 8 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.