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 > ImageList Class : ViewStyle Property





Gets or sets how items are displayed in the control. This is a dependency property.

Syntax

Visual Basic (Declaration) 
Public Property ViewStyle As ImageListViewStyle
Visual Basic (Usage)Copy Code
Dim instance As ImageList
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

An ImageListViewStyle enumeration value that specifies how the items are displayed in the control.

Example

Visual BasicCopy Code
''' This example will show the different view styles of a <see cref="ImageList"/> control.
Public Sub ImageList_ViewStyle(ByVal imageList As ImageList)
   ' Save the current view style
   Dim currentStyle As ImageListViewStyle = imageList.ViewStyle
   ' Show all the different styles available
   Dim a As Array = System.Enum.GetValues(GetType(ImageListViewStyle))
   For Each style As ImageListViewStyle In a
      imageList.ViewStyle = style
      MessageBox.Show("ViewStyle = " & style.ToString())
   Next style

   ' Restore original view style
   imageList.ViewStyle = currentStyle
End Sub
C#Copy Code
/// This example will show the different view styles of a <see cref="ImageList"/> control. 
public void ImageList_ViewStyle(ImageList imageList) 

   // Save the current view style 
   ImageListViewStyle currentStyle = imageList.ViewStyle; 
   // Show all the different styles available 
   Array a = Enum.GetValues(typeof(ImageListViewStyle)); 
   foreach (ImageListViewStyle style in a) 
   { 
      imageList.ViewStyle = style; 
      MessageBox.Show("ViewStyle = " + style.ToString()); 
   } 
 
   // Restore original view style 
   imageList.ViewStyle = currentStyle; 
}

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