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)

public int ItemHeaderSize { get; set; }

Property Value

Type: System.Int32

The size of the item header, in pixels. The default value is 15.

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.


If the ItemHeaderSize property is set to a value that is less than 11, the indicator icons in the item header are not displayed.

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;
        dataRepeater1.LayoutStyle = DataRepeaterLayoutStyles.Vertical;
        dataRepeater1.ItemHeaderSize = 18;
Return to top