'Declaration Public Property CaptionAlignment As GroupBoxCaptionAlignment
public GroupBoxCaptionAlignment CaptionAlignment {get; set;}
This property controls where the caption appears in the header. The behavioral invariant of this property is that setting it to 'Near' will cause the caption to be rendered such that the first character is close to an edge of the header. In other words, setting this property to 'Far' will cause the last character of the caption to be rendered close to an edge of the header (possibly leaving a large gap between the first character and a header edge).
If the header is horizontal then setting this property to 'Near' means that the caption will be rendered on the left side of the header. If the header is vertical (i.e. on the left or right edge of the control) then the VerticalTextOrientation property must be taken into consideration to determine where the caption will appear. This is due to the fact that the VerticalTextOrientation property changes the direction that the caption is rendered.
Imports Infragistics.Win.Misc Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Center the control's caption in the header. Me.UltraGroupBox1.CaptionAlignment = GroupBoxCaptionAlignment.Center End Sub
using Infragistics.Win.Misc; private void Form1_Load(object sender, System.EventArgs e) { // Center the control's caption in the header. this.ultraGroupBox1.CaptionAlignment = GroupBoxCaptionAlignment.Center; }
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