Visual Basic (Declaration) | |
---|---|
Public Property ImageSize As Size |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public Size ImageSize {get; set;} |
XAML Attributes Usage | |
---|---|
<object ImageSize=Size .../> |
Dependencies Property Information | |
---|---|
Identifier field | |
Metadata properties set to true | None |
XAML Property Element Usage | |
---|---|
<object> <object.ImageSize> <Size .../> </object.ImageSize> </object> |
XAML Attributes Usage | |
---|---|
<object ImageSize=Size .../> |
Dependencies Property Information | |
---|---|
Identifier field | |
Metadata properties set to true | None |
XAML Property Element Usage | |
---|---|
<object> <object.ImageSize> <Size .../> </object.ImageSize> </object> |
Return Value
A Size structure that specifies the maximum size of the image of each ImageListItem in this ImageList in units.For XAML example, refer to ScrollStyle.
For C#/VB examples, refer to ItemBorderBrush.
The ImageSize specifies the maximum size of the image of each item in the ImageList control. The ImageListItem.Image of each image is drawn into the item surface using the maximum size possible of ImageSize while maintaining the aspect ratio of the image. If the ImageListItem.Image of an item is smaller than ImageSize, then no re-sizing is done when the image is drawn. In other words, the ImageList control implements a "Fit if larger" drawing algorithm when the item images are painted.
When changing any of the item sizes or styles, you should pay special attention to the values you specify, in general, you should setup ItemSize to be large enough to accommodate ImageSize plus room for ShowText if you set the ShowText property to true
For more information about item appearance, refer to ImageList Appearance.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family