Version

Controls Property (UltraExpandableGroupBox)

Do not use this property to add controls to the UltraExpandableGroupBox. Use the Panel property to access the UltraExpandableGroupBoxPanel. Use it's Controls collection instead. The panel stores the child controls for the group box.
Syntax
'Declaration
 
Public Shadows ReadOnly Property Controls As Control.ControlCollection
public new Control.ControlCollection Controls {get;}
Remarks
Instead of adding controls directly to the Controls collection of the UltraExpandableGroupBox they should be added to the Controls collection of the Panel property. The UltraExpandableGroupBox only ever has one child control; an UltraExpandableGroupBoxPanel. That panel hosts all of the controls contained within the group box.
Example
This snippet demonstrates how you can add child controls to the UltraExpandableGroupBox. Note that you do not add them directly to the Controls collection of the UltraExpandableGroupBox, rather, you add them to the Controls collection of the Panel property.

Private Sub LoadChildControls()

    ' Get a reference to the UltraExpandableGroupBoxPanel in the groupbox.
    Dim panel As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel = Me.ultraExpandableGroupBox1.Panel

    ' Create child controls and add them to the panel.
    '
    Dim btn As New Infragistics.Win.Misc.UltraButton()

    panel.Controls.Add(btn)

    btn.Text = "Click Me"
    btn.Size = New Size(75, 30)
    btn.Location = New Point(210, 190)

    Dim txt As New Infragistics.Win.UltraWinEditors.UltraTextEditor()

    panel.Controls.Add(txt)

    txt.Text = "Enter some text..."
    txt.Size = New Size(200, txt.Size.Height)
    txt.Location = New Point(panel.Width / 2 - txt.Width / 2, 80)

End Sub
private void LoadChildControls()
{
	// Get a reference to the UltraExpandableGroupBoxPanel in the groupbox.
	Infragistics.Win.Misc.UltraExpandableGroupBoxPanel panel = this.ultraExpandableGroupBox1.Panel;

	// Create child controls and add them to the panel.
	//
	Infragistics.Win.Misc.UltraButton btn = new Infragistics.Win.Misc.UltraButton();

	panel.Controls.Add( btn );

	btn.Text = "Click Me";
	btn.Size = new Size( 75, 30 );
	btn.Location = new Point( 210, 190 );
	
	Infragistics.Win.UltraWinEditors.UltraTextEditor txt = new Infragistics.Win.UltraWinEditors.UltraTextEditor();

	panel.Controls.Add( txt );

	txt.Text = "Enter some text...";
	txt.Size = new Size( 200, txt.Size.Height );
	txt.Location = new Point( panel.Width / 2 - txt.Width / 2, 80 );
}
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