Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.03.25
ViewStyle Property
See Also  Example
Leadtools.Windows.Controls Namespace > ImageListItem Class : ViewStyle Property





Gets or sets how item is displayed. This is a dependency property.

Syntax

Visual Basic (Declaration) 
Public Property ViewStyle As ImageListViewStyle
Visual Basic (Usage)Copy Code
Dim instance As ImageListItem
Dim value As ImageListViewStyle
 
instance.ViewStyle = value
 
value = instance.ViewStyle
C# 
public ImageListViewStyle ViewStyle {get; set;}
Managed Extensions for C++ 
public: __property ImageListViewStyle get_ViewStyle();
public: __property void set_ViewStyle( 
   ImageListViewStyle value
);
C++/CLI 
public:
property ImageListViewStyle ViewStyle {
   ImageListViewStyle get();
   void set (ImageListViewStyle value);
}
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 BasicCopy Code
''' This example will show the different view styles of a <see cref="ImageListItem"/> control.
Public Sub ImageListItem_ViewStyle(ByVal imageList As ImageList)
   For Each item As ImageListItem In imageList.Items
      ' Save the current view style
      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

For more information, refer to the ImageListViewStyle enumeration.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also