Gets or sets how item is displayed. This is a dependency property.
Syntax
XAML Attributes Usage | |
---|
<object ViewStyle=Leadtools.Windows.Controls.ImageListViewStyle .../> |
Dependency Property Information | |
---|
Identifier field | ViewStyleProperty |
Metadata properties set to true | None |
Return Value
A
ImageListViewStyle enumeration that specifies how the item
is displayed.
Example
Visual Basic | Copy Code |
---|
Public Sub ImageListItem_ViewStyle(ByVal imageList As ImageList)
For Each item As ImageListItem In imageList.Items
item.ViewStyle = CType(imageList.Items.IndexOf(item) Mod System.Enum.GetValues(GetType(ImageListViewStyle)).Length, ImageListViewStyle)
Dim currentStyle As ImageListViewStyle = imageList.ViewStyle
Next item
End Sub
|
C# | Copy Code |
---|
/// This example will show the different view styles of a <see cref="ImageListItem"/> control. public void ImageListItem_ViewStyle(ImageList imageList) { foreach (ImageListItem item in imageList.Items) { // Save the current view style item.ViewStyle = (ImageListViewStyle)(imageList.Items.IndexOf(item) % Enum.GetValues(typeof(ImageListViewStyle)).Length); ImageListViewStyle currentStyle = imageList.ViewStyle; } } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also