Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - LEADTOOLS WPF | Help Version 16.5.9.25
ImageSize Property
See Also 
Leadtools.Windows.Controls Namespace > ImageList Class : ImageSize Property





Gets or sets the maximum size of the image of each ImageListItem in the control. This is a dependency property.

Syntax

Visual Basic (Declaration) 
Public Property ImageSize As Size
Visual Basic (Usage)Copy Code
Dim instance As ImageList
Dim value As Size
 
instance.ImageSize = value
 
value = instance.ImageSize
C# 
public Size ImageSize {get; set;}
C++/CLI 
public:
property Size ImageSize {
   Size get();
   void set (Size value);
}
XAML Attributes Usage 

<object ImageSize=Size .../>

Dependencies Property Information 

Identifier field

ImageSizeProperty

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

ImageSizeProperty

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.

Example

For XAML example, refer to ScrollStyle.

For C#/VB examples, refer to ItemBorderBrush.

Remarks

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.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also