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

'Declaration
Public Property ItemHeaderSize As Integer
public int ItemHeaderSize { get; set; }
public:
property int ItemHeaderSize {
    int get ();
    void set (int value);
}
member ItemHeaderSize : int with get, set
function get ItemHeaderSize () : int 
function set ItemHeaderSize (value : int)

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 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
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;
    }
}

.NET Framework Security

See Also

Reference

DataRepeater Class

Microsoft.VisualBasic.PowerPacks Namespace

ItemHeaderVisible

SelectionColor

Other Resources

Introduction to the DataRepeater Control (Visual Studio)

How to: Display Item Headers in a DataRepeater Control