Visual Basic (Declaration) | |
---|---|
Public Class ImageList Inherits ListBox Implements IGeneratorHost |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public class ImageList : ListBox, IGeneratorHost |
C++/CLI | |
---|---|
public ref class ImageList : public ListBox, IGeneratorHost |
XAML Object Element Usage | |
---|---|
<ImageList .../> |
XAML Object Element Usage | |
---|---|
<ImageList .../> |
For XAML example, refer to ScrollStyle.
This example creates an instance of an ImageList control and adds it to a form. Next, three images are loaded to populate the control.
Visual Basic | Copy Code |
---|---|
Private Class MyWindow1 : Inherits Window |
C# | Copy Code |
---|---|
class MyWindow1 : Window |
The ImageList control lets you display and manipulate a list of images. The ImageList control contains a list of items that can be used to view thumbnails of BitmapSource objects.
An ImageList control allows you to display a list of items with text and a BitmapSource.
For example, the Windows Explorer in Thumbnails mode is similar in appearance to an
ImageList control. The ImageListItem class represents an item within an
ImageList control. The items that are displayed in the list can be shown using one of the
ImageListViewStyle styles.
The ImageList supports single or multiple item selection. The multiple selection
feature lets the user select from a list of items in a way similar to a ListBox control.
Additionally, the user can activate selected items to perform a task. For example, you could use an
ImageList control to display a list of files that the application can then open and utilize.
The user can select the files to open and then double-click them to activate the items and open the files in the
application.
The ImageList provides a large number of properties that provide flexibility in appearance and behavior. The ViewStyle property allows the way in which items are displayed to be changed. Items are added and removed from the ImageList through the Items property. You may want to provide functionality when the user right-clicks an item. To determine the item which is being clicked, use the HitTest method, or manually calculate which item is displayed in what position using the ItemSize property. Sometimes you want to display a specific item for the user to view. Call the EnsureVisible method to ensure that the specific item is in the visible area of the control.
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.ItemsControl
System.Windows.Controls.Primitives.Selector
System.Windows.Controls.ListBox
Leadtools.Windows.Controls.ImageList
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, Windows Server 2003 family, Windows Server 2008 family