Version

ViewStyle Property (UltraExpandableGroupBox)

Gets/sets the visual scheme of the control.
Syntax
'Declaration
 
Public Overrides Property ViewStyle As GroupBoxViewStyle
public override GroupBoxViewStyle ViewStyle {get; set;}
Remarks

The view style primarily affects the colors and border style of the control. When the view style is set to 'Office2003' or 'VisualStudio2005' the expansion indicator will have a different size and appearance.


Below is an overview of the different GroupBoxViewStyle values:

  • XP - The control emulates the themed groupbox seen in Windows XP. The System.Windows.Forms.BorderStyle defaults to 'Rounded'.
  • Office2000 - The control emulates the groupbox seen in Micrsoft Office 2000 applications. The System.Windows.Forms.BorderStyle defaults to 'Rectangular3D'.
  • Office2003 - The control is rendered with colors which are in the style of Office 2003 applications. The System.Windows.Forms.BorderStyle defaults to 'RectangularSolid'. The expansion indicator is circular with a chevron.
  • VisualStudio2005 - The control is rendered with colors which are in the style of Visual Studio 2005. The System.Windows.Forms.BorderStyle defaults to 'RectangularSolid'. The expansion indicator is a thin rectangle with a chevron.

Example
The following snippet demonstrates how you can use the BorderStyleResolved property to determine what the default GroupBoxBorderStyle is for each GroupBoxViewStyle.

The default GroupBoxBorderStyle used by the control is dependent on the GroupBoxViewStyle being used. This code snippet shows how you can use the BorderStyleResolved property to determine what the default values are.
Imports Infragistics.Win.Misc

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        ' The following block of code shows what the default border styles are for each GroupBoxViewStyle.

        Me.UltraGroupBox1.ViewStyle = GroupBoxViewStyle.Office2000
        Trace.Assert(Me.UltraGroupBox1.BorderStyleResolved = GroupBoxBorderStyle.Rectangular3D)

        Me.UltraGroupBox1.ViewStyle = GroupBoxViewStyle.Office2003
        Trace.Assert(Me.UltraGroupBox1.BorderStyleResolved = GroupBoxBorderStyle.RectangularSolid)

        Me.UltraGroupBox1.ViewStyle = GroupBoxViewStyle.VisualStudio2005
        Trace.Assert(Me.UltraGroupBox1.BorderStyleResolved = GroupBoxBorderStyle.RectangularSolid)

        Me.UltraGroupBox1.ViewStyle = GroupBoxViewStyle.XP
        Trace.Assert(Me.UltraGroupBox1.BorderStyleResolved = GroupBoxBorderStyle.Rounded)

End Sub
The default GroupBoxBorderStyle used by the control is dependent on the GroupBoxViewStyle being used. This code snippet shows how you can use the BorderStyleResolved property to determine what the default values are.
using Infragistics.Win.Misc;
using System.Diagnostics;

private void Form1_Load(object sender, System.EventArgs e)
{
	// The following block of code shows what the default border styles are for each GroupBoxViewStyle.

	this.ultraGroupBox1.ViewStyle = GroupBoxViewStyle.Office2000;
	Trace.Assert( this.ultraGroupBox1.BorderStyleResolved == GroupBoxBorderStyle.Rectangular3D );

	this.ultraGroupBox1.ViewStyle = GroupBoxViewStyle.Office2003;
	Trace.Assert( this.ultraGroupBox1.BorderStyleResolved == GroupBoxBorderStyle.RectangularSolid );

	this.ultraGroupBox1.ViewStyle = GroupBoxViewStyle.VisualStudio2005;
	Trace.Assert( this.ultraGroupBox1.BorderStyleResolved == GroupBoxBorderStyle.RectangularSolid );

	this.ultraGroupBox1.ViewStyle = GroupBoxViewStyle.XP;
	Trace.Assert( this.ultraGroupBox1.BorderStyleResolved == GroupBoxBorderStyle.Rounded );
}
Requirements

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

See Also