Version

ShowFocus Property

Gets/sets whether the expansion indicator shows the focus rectangle.
Syntax
'Declaration
 
Public Property ShowFocus As Boolean
public bool ShowFocus {get; set;}
Remarks

It is sometimes useful to allow the control to receive focus but to prevent it from rendering the focus rectangle (the dotted line within the borders of the expansion indicator). The ShowFocus property may be set to false to prevent the control from rendering the focus rectangle when the control receives focus. When set to true, its default value, the focus rectangle will be rendered when the control has the input focus.

Example
The following snippet shows how to use many of the different properties provided by the UltraExpandableGroupBox to customize it's appearance.

Imports Infragistics.Win

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

    ' Make sure that the UltraExpandableGroupBox is expanded.
    Me.UltraExpandableGroupBox1.Expanded = True

    ' Set custom images for the expansion indicator when the control is collapsed and expanded.
    Me.UltraExpandableGroupBox1.ExpansionIndicatorCollapsed = Bitmap.FromFile("myCollapsedImage.bmp")
    Me.UltraExpandableGroupBox1.ExpansionIndicatorExpanded = Bitmap.FromFile("myExpandedImage.bmp")

    ' Prevent the expansion indicator from drawing a focus rectangle when the control has focus.
    Me.UltraExpandableGroupBox1.ShowFocus = False

    ' Allow the elements in the header to hottrack.
    Me.UltraExpandableGroupBox1.HotTracking = True

    ' Make the caption red when the header is being hottracked.
    Me.UltraExpandableGroupBox1.HeaderHotTrackingAppearance.ForeColor = Color.Red

    ' Ensure that the caption is not bold when the control is collapsed.
    Me.UltraExpandableGroupBox1.HeaderCollapsedAppearance.FontData.Bold = DefaultableBoolean.False

    ' Make the caption bold when the control is expanded.
    Me.UltraExpandableGroupBox1.HeaderExpandedAppearance.FontData.Bold = DefaultableBoolean.True

End Sub
using Infragistics.Win;

private void Form1_Load(object sender, System.EventArgs e)
{
	// Make sure that the UltraExpandableGroupBox is expanded.
	this.ultraExpandableGroupBox1.Expanded = true;

	// Set custom images for the expansion indicator when the control is collapsed and expanded.
	this.ultraExpandableGroupBox1.ExpansionIndicatorCollapsed = Bitmap.FromFile( "myCollapsedImage.bmp" );
	this.ultraExpandableGroupBox1.ExpansionIndicatorExpanded  = Bitmap.FromFile( "myExpandedImage.bmp" );

	// Prevent the expansion indicator from drawing a focus rectangle when the control has focus.
	this.ultraExpandableGroupBox1.ShowFocus = false;

	// Allow the elements in the header to hottrack.
	this.ultraExpandableGroupBox1.HotTracking = true;

	// Make the caption red when the header is being hottracked.
	this.ultraExpandableGroupBox1.HeaderHotTrackingAppearance.ForeColor = Color.Red;

	// Ensure that the caption is not bold when the control is collapsed.
    this.ultraExpandableGroupBox1.HeaderCollapsedAppearance.FontData.Bold = DefaultableBoolean.False;

	// Make the caption bold when the control is expanded.
	this.ultraExpandableGroupBox1.HeaderExpandedAppearance.FontData.Bold = DefaultableBoolean.True;
}
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