Visual Basic (Declaration) | |
---|---|
Property Source As ImageSource |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As IImageListItem Dim value As ImageSource instance.Source = value value = instance.Source |
C# | |
---|---|
ImageSource Source {get; set;} |
C++/CLI | |
---|---|
property ImageSource^ Source { ImageSource^ get(); void set ( ImageSource^ value); } |
Property Value
An System.Windows.Media.ImageSource object associated with this IImageListItem object.For C#/VB examples, refer to IImageListItem.
The ImageList control will draw this image onto 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 drawn.
You can set the Source property directly with the item image or you can set the Uri property with the path to the image and let the control load the image.
You must ensure that the area defined by Width and Height is large enough to hold both the image size defined in ImageSize and the item text.
Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family