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





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;}
C++/CLI 
public:
property BitmapSource Image {
   BitmapSource get();
   void set (BitmapSource value);
}
XAML Syntax 
For XAML information, see the BitmapSource type.
XAML Attributes Usage 

<object Image=imageUri/>

Dependencies Property Information 

Identifier field

ImageProperty

Metadata properties set to true

None

XAML Values 

imageUri System.String A URI of the image file.

XAML Syntax 
For XAML information, see the BitmapSource type.
XAML Attributes Usage 

<object Image=imageUri/>

Dependencies 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 XAML example, refer to ImageSize.

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