Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.03.25
Image Property
See Also 
Leadtools.Windows.Controls Namespace > ImageListItem Class : Image Property





This member is available in the WPF Express Edition. See the LEADTOOLS products page for full details on more WPF features available with LEADTOOLS toolkits.

The image associated with this ImageListItem object.

Syntax

Visual Basic (Declaration) 
Public Property Image As BitmapSource
Visual Basic (Usage)Copy Code
Dim instance As ImageListItem
Dim value As BitmapSource
 
instance.Image = value
 
value = instance.Image
C# 
public BitmapSource Image {get; set;}
Managed Extensions for C++ 
public: __property BitmapSource get_Image();
public: __property void set_Image( 
   BitmapSource value
);
C++/CLI 
public:
property BitmapSource Image {
   BitmapSource get();
   void set (BitmapSource value);
}
XAML 
For XAML information, see the BitmapSource type.
XAML Attributes Usage 

<object Image=imageUri/>

Dependency Property Information 

Identifier field

ImageProperty

Metadata properties set to true

None

XAML Values 

imageUri System.String A URI of the image file.

Return Value

A BitmapSource object associated with this ImageListItem object. Default value is null (Nothing in Visual Basic).

Example

For C#/VB examples, refer to ImageSize.

Remarks

The ImageList control will render this image into the item surface. If the item does not have an image, the value of this property is null (Nothing in Visual Basic) and, nothing is rendered.

The ImageList control paints the image in the following manner:

  • If the image size is less than or equal to the ImageSize value, the image is rendered with its original size only centered into the item surface.
  • If the image size is greater than the ImageSize value, the image is stretched to this smaller size but keeping the aspect ratio the same.
  • It is recommended that you populate the items with "thumbnail" images. This will increase the performance of the item painting operation. In this case, you can use the FileName propertey to store the information needed to load the image in its original size when requested.

Requirements

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

See Also