Version

HasExpansionIndicatorCollapsed Property

Returns true if a custom image has been assigned to the expansion indicator for when the control is collapsed.
Syntax
'Declaration
 
Public ReadOnly Property HasExpansionIndicatorCollapsed As Boolean
public bool HasExpansionIndicatorCollapsed {get;}
Example
This snippet shows how you can use the HasExpansionIndicatorCollapsed and HasExpansionIndicatorExpanded properties to clarify your code that disposes of custom images used in the control's expansion indicator.

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    If disposing Then
        ' If a custom image was assigned for the expansion indicator when the control
        ' is either collapsed or expanded, dispose of those Image objects now.
        If Me.UltraExpandableGroupBox1.HasExpansionIndicatorCollapsed Then
            Me.UltraExpandableGroupBox1.ExpansionIndicatorCollapsed.Dispose()
            Me.UltraExpandableGroupBox1.ExpansionIndicatorCollapsed = Nothing
        End If

        If Me.UltraExpandableGroupBox1.HasExpansionIndicatorExpanded Then
            Me.UltraExpandableGroupBox1.ExpansionIndicatorExpanded.Dispose()
            Me.UltraExpandableGroupBox1.ExpansionIndicatorExpanded = Nothing
        End If

        If Not (components Is Nothing) Then
            components.Dispose()
        End If
    End If
    MyBase.Dispose(disposing)
End Sub
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
	if( disposing )
	{
		// If a custom image was assigned for the expansion indicator when the control
		// is either collapsed or expanded, dispose of those Image objects now.
		if( this.ultraExpandableGroupBox1.HasExpansionIndicatorCollapsed )
		{
			this.ultraExpandableGroupBox1.ExpansionIndicatorCollapsed.Dispose();
			this.ultraExpandableGroupBox1.ExpansionIndicatorCollapsed = null;
		}

		if( this.ultraExpandableGroupBox1.HasExpansionIndicatorExpanded )
		{
			this.ultraExpandableGroupBox1.ExpansionIndicatorExpanded.Dispose();
			this.ultraExpandableGroupBox1.ExpansionIndicatorExpanded = null;
		}

		if (components != null) 
		{
			components.Dispose();
		}
	}
	base.Dispose( disposing );
}
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