Gets or sets how items are displayed in the control. This is a dependency property.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As ImageList
Dim value As ImageListViewStyle
instance.ViewStyle = value
value = instance.ViewStyle
|
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 Basic | Copy Code |
---|
Public Sub ImageList_ViewStyle(ByVal imageList As ImageList)
Dim currentStyle As ImageListViewStyle = imageList.ViewStyle
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
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
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also