Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - LEADTOOLS WPF | Help Version 16.5.9.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;}
C++/CLI 
public:
property ImageListViewStyle ViewStyle {
   ImageListViewStyle get();
   void set (ImageListViewStyle value);
}
XAML Attributes Usage 

<object ViewStyle=Leadtools.Windows.Controls.ImageListViewStyle .../>

Dependencies Property Information 

Identifier field

ViewStyleProperty

Metadata properties set to true

None

XAML Attributes Usage 

<object ViewStyle=Leadtools.Windows.Controls.ImageListViewStyle .../>

Dependencies 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

For XAML example, refer to ScrollStyle.

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