'Declaration Public Property HeaderPosition As GroupBoxHeaderPosition
public GroupBoxHeaderPosition HeaderPosition {get; set;}
This property can be used to determine the location of the controls header. There are two aspects involved with the different header positions: which side of the control, and the location relative to the controls border. The header can be on the top or bottom of the control (i.e. horizontal) or on the left or right side (i.e. vertical). The header can also be "on" the border, "outside" the border, or "inside" the border. The meaning of these latter terms are relative to the side of the control that the header is on.
For example, if the header is on the top edge of the control then "outside" the border means above it, and "inside" the border means below it. When the header is said to be "inside" the border, it always indicates that the header is contained within the content area of the control.
Imports Infragistics.Win.Misc Private Sub UltraExpandableGroupBox1_ExpandedStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraExpandableGroupBox1.ExpandedStateChanged If Me.UltraExpandableGroupBox1.Expanded Then Me.UltraExpandableGroupBox1.HeaderPosition = GroupBoxHeaderPosition.TopOnBorder Else ' Set the HeaderPosition to RightOnBorder so that the header will be vertical and the caption ' will be facing the correct direction. Alternatively we could have set the control's ' VerticalTextOrientation to TopToBottom and set the HeaderPosition to LeftOnBorder, like so: ' ' Me.UltraExpandableGroupBox1.VerticalTextOrientation = GroupBoxVerticalTextOrientation.TopToBottom ' Me.UltraExpandableGroupBox1.HeaderPosition = GroupBoxHeaderPosition.LeftOnBorder Me.UltraExpandableGroupBox1.HeaderPosition = GroupBoxHeaderPosition.RightOnBorder End If End Sub
using Infragistics.Win.Misc; private void ultraExpandableGroupBox1_ExpandedStateChanged(object sender, System.EventArgs e) { if( this.ultraExpandableGroupBox1.Expanded ) { this.ultraExpandableGroupBox1.HeaderPosition = GroupBoxHeaderPosition.TopOnBorder; } else { // Set the HeaderPosition to RightOnBorder so that the header will be vertical and the caption // will be facing the correct direction. Alternatively we could have set the control's // VerticalTextOrientation to TopToBottom and set the HeaderPosition to LeftOnBorder, like so: // // this.ultraExpandableGroupBox1.VerticalTextOrientation = GroupBoxVerticalTextOrientation.TopToBottom; // this.ultraExpandableGroupBox1.HeaderPosition = GroupBoxHeaderPosition.LeftOnBorder; this.ultraExpandableGroupBox1.HeaderPosition = GroupBoxHeaderPosition.RightOnBorder; } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2