DataRepeater.ItemHeaderSize Property
Gets or sets the size of the item header in a DataRepeater control.
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
public int ItemHeaderSize { get; set; }
public:
property int ItemHeaderSize {
int get();
void set(int value);
}
member ItemHeaderSize : int with get, set
Public Property ItemHeaderSize As Integer
Property Value
Type: System.Int32
The size of the item header, in pixels. The default value is 15.
Remarks
When the LayoutStyle property is set to Vertical (the default), ItemHeaderSize specifies the width of the item header. When the LayoutStyle property is set to Horizontal, ItemHeaderSize specifies the height of the item header.
Note
If the ItemHeaderSize property is set to a value that is less than 11, the indicator icons in the item header are not displayed.
Examples
The following code example demonstrates how to change the size of the item header in a DataRepeater control by setting the ItemHeaderSize property. It assumes that you have a form that contains a DataRepeater control named DataRepeater1 and a Button control named Button1.
private void button1_Click(System.Object sender, System.EventArgs e)
{
// Change the orientation and set the ItemHeaderSize accordingly.
if (dataRepeater1.LayoutStyle == DataRepeaterLayoutStyles.Vertical)
{
dataRepeater1.LayoutStyle = DataRepeaterLayoutStyles.Horizontal;
dataRepeater1.ItemHeaderSize = 12;
}
else
{
dataRepeater1.LayoutStyle = DataRepeaterLayoutStyles.Vertical;
dataRepeater1.ItemHeaderSize = 18;
}
}
Private Sub Button1_Click() Handles Button1.Click
' Change the orientation and set the ItemHeaderSize accordingly.
If DataRepeater1.LayoutStyle =
PowerPacks.DataRepeaterLayoutStyles.Vertical Then
DataRepeater1.LayoutStyle =
PowerPacks.DataRepeaterLayoutStyles.Horizontal
DataRepeater1.ItemHeaderSize = 12
Else
DataRepeater1.LayoutStyle =
PowerPacks.DataRepeaterLayoutStyles.Vertical
DataRepeater1.ItemHeaderSize = 18
End If
End Sub
See Also
ItemHeaderVisible
SelectionColor
DataRepeater Class
Microsoft.VisualBasic.PowerPacks Namespace
Introduction to the DataRepeater Control (Visual Studio)
084cf700-4837-4471-9ef5-c378b493ecae
Return to top