LEADTOOLS Windows Forms (Leadtools.WinForms assembly)
LEAD Technologies, Inc

ItemImageSize Property (RasterImageList)






Gets or sets the maximum size of the image of each RasterImageListItem in the control.
Syntax
[DescriptionAttribute("Size of each item image in pixels.")]
[CategoryAttribute("Appearance")]
public Size ItemImageSize {get; set;}
'Declaration
 
<DescriptionAttribute("Size of each item image in pixels.")>
<CategoryAttribute("Appearance")>
Public Property ItemImageSize As Size
'Usage
 
Dim instance As RasterImageList
Dim value As Size
 
instance.ItemImageSize = value
 
value = instance.ItemImageSize
[DescriptionAttribute("Size of each item image in pixels.")]
[CategoryAttribute("Appearance")]
public Size ItemImageSize {get; set;}
DescriptionAttribute("Size of each item image in pixels.")
CategoryAttribute("Appearance")
 get_ItemImageSize();
set_ItemImageSize(value);
[DescriptionAttribute("Size of each item image in pixels.")]
[CategoryAttribute("Appearance")]
public:
property Size ItemImageSize {
   Size get();
   void set (    Size value);
}

Property Value

A System.Drawing.Size structure that specifies the maximum size of the image of each RasterImageListItem in this RasterImageList in pixels.
Remarks

The ItemImageSize specifies the maximum size of the image of each item in the RasterImageList control. The RasterImageListItem.Image of each image is drawn into the item surface using the maximum size possible of ItemImageSize while maintaining the aspect ratio of the image. If the RasterImageListItem.Image of an item is smaller than ItemImageSize, then no re-sizing is done when the image is drawn. In other words, the RasterImageList 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 ItemImageSize plus room for ItemBorderStyle and ItemImageBorderStyle. If you set the ShowItemText property to true, then you should also accommodate room for the item text in your calculations.

For more information about item appearance, refer to RasterImageList Appearance.

Example
For an example, refer to DrawItem event.
Requirements

Target Platforms: 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

Reference

RasterImageList Class
RasterImageList Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.