Version

ImageScaling Enumeration

Bitflags which define the manner in which the size and/or placement of an image is adjusted when the size of the image is different than that of the area in which it is being displayed.
Syntax
'Declaration
 
Public Enum ImageScaling 
   Inherits System.Enum
public enum ImageScaling : System.Enum 
Members
MemberDescription
FillCombines the 'FillWhenSmaller' and 'FillWhenLarger' settings.
FillWhenLargerThe image width or height is contracted so as to fit within the image display area. Since aspect ratio is maintained, this may cause the other dimension to remain larger that of the display area; in this case, the image is clipped and centered. Clear this flag to fit the image within the display area, while still allowing the area to remain partially unfilled.
FillWhenSmallerIn cases where the natural size of the image is smaller than that of the area in which it is displayed, the image size is expanded such that one dimension fits exactly. Since aspect ratio is maintained, this may cause the other dimension to exceed that of the display area; in this case, the image is clipped and centered. Clear this flag to avoid scaling of images that are smaller than the image display area.
NoneNo scaling; the image is displayed at its natural size. If the area in which the image is displayed is not large enough to accommodate the image, the right and bottom edges of the image are clipped.
ScaleToFitImages with a natural size that is greater than that of the area in which they are displayed are scaled so as to fit within that area. Aspect ratio is maintained. When combined with the 'FillWhenLarger' setting, the image is scaled in such a way as to fill the image area, clipping the larger of the two dimensions, and centering within the image area. Note that this setting has no effect on images whose natural size is smaller than that of the image display area.
Remarks

Note that with all settings, the original aspect ratio of the image is always maintained.

For images which are smaller than the image display area, the image can either be displayed at its natural size, leaving part of the image display area uncovered, or expanded so that it fills the image display area completely.

For images which are larger than the image display area, two scaling modes are supported. When the 'ScaleToFit' flag is set without the 'FillWhenLarger' flag, the image is resized so that its larger dimension fits exactly within the image display area. This setting ensures that the entire image is visible, but can cause part of the image display area to remain uncovered.

When the 'FillWhenLarger' flag is set, the image is resized so that one dimension fits exactly within the image display area. The other dimension is then resized according to the original aspect ratio of the image, and the image is then centered within the image display area, clipping the top/bottom or left/right edges of the image, depending on the dimensions of the image display area.

The scaling mode can be specified for individual images, image sets, all images displayed for a given tile, or for all tiles, depending on the object on which the property is set.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also