DataRepeaterLayoutStyles Enumeration
Provides an enumeration for specifying the orientation of items in a DataRepeater control.
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
'Declaration
Public Enumeration DataRepeaterLayoutStyles
public enum DataRepeaterLayoutStyles
public enum class DataRepeaterLayoutStyles
type DataRepeaterLayoutStyles
public enum DataRepeaterLayoutStyles
Members
Member name | Description | |
---|---|---|
Horizontal | Items will be displayed in a horizontal format. A horizontal scroll bar will be displayed as necessary. | |
Vertical | Default. Items will be displayed in a vertical format. A vertical scroll bar will be displayed as necessary. |
Remarks
The DataRepeaterLayoutStyles enumeration is used by the LayoutStyle property of the DataRepeater control.
In most cases, you will have to add code in the LayoutStyleChanged event handler to rearrange the child controls when you change the orientation.
Examples
The following code example demonstrates how to toggle between vertical and horizontal layouts.
' Switch the orientation.
If DataRepeater1.LayoutStyle =
PowerPacks.DataRepeaterLayoutStyles.Vertical Then
DataRepeater1.LayoutStyle =
PowerPacks.DataRepeaterLayoutStyles.Horizontal
Else
DataRepeater1.LayoutStyle =
PowerPacks.DataRepeaterLayoutStyles.Vertical
End If
// Switch the orientation.
if (dataRepeater1.LayoutStyle == DataRepeaterLayoutStyles.Vertical)
{
dataRepeater1.LayoutStyle = DataRepeaterLayoutStyles.Horizontal;
}
else
{
dataRepeater1.LayoutStyle = DataRepeaterLayoutStyles.Vertical;
}
See Also
Reference
Microsoft.VisualBasic.PowerPacks Namespace
Other Resources
How to: Change the Layout of a DataRepeater Control (Visual Studio)
How to: Change the Appearance of a DataRepeater Control (Visual Studio)