Visual Basic (Declaration) | |
---|---|
<ContentPropertyAttribute("FileName")> Public Class ImageListItem Inherits ListBoxItem |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
[ContentPropertyAttribute("FileName")] public class ImageListItem : ListBoxItem |
C++/CLI | |
---|---|
[ContentPropertyAttribute("FileName")] public ref class ImageListItem : public ListBoxItem |
XAML Object Element Usage | |
---|---|
<ImageListItem .../> |
XAML Object Element Usage | |
---|---|
<ImageListItem .../> |
For C#/VB examples, refer to ImageList.
XAML | Copy Code |
---|---|
<Window Height="600" Width="800" Title="using ImageListItem with ListBox Sample" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Leadtools_Windows_Controls="clr-namespace:Leadtools.Windows.Controls;assembly=Leadtools.Windows.Controls"> |
The ImageList control is derived from ListBox. The main difference is that the ImageList supports viewing the BitmapSource in the number of different ways that items can be viewed by the user. The ImageListItem class defines the appearance and data associated with an item that is displayed in the ImageList control.
Most of the properties of the ImageListItem class provide ways to change the display of the item in the ImageList control it is associated with. The Image properties allows you to specify the image to view. Items also have a Text property that displays the text associated with this item.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ContentControl
System.Windows.Controls.ListBoxItem
Leadtools.Windows.Controls.ImageListItem
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, Windows Server 2003 family, Windows Server 2008 family