System.Windows.Forms.Control.HasChildren Property

Gets a value indicating whether the control contains one or more child controls.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public bool HasChildren { get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the Control.Controls collection has a System.Windows.Forms.Layout.ArrangedElementCollection.Count greater than zero, the Control.HasChildren property will return true. Accessing the Control.HasChildren property does not force the creation of a System.Windows.Forms.Control.ControlCollection if the control has no children, so referencing this property can provide a performance benefit when walking a tree of controls.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0