Method HasIndirectParent
HasIndirectParent(AbstractControl?)
Gets whether one of this control's parents equals testParent.
public virtual bool HasIndirectParent(AbstractControl? testParent)
Parameters
testParentAbstractControlControl to test as an indirect parent.
Returns
HasIndirectParent<T>()
Determines whether the current control has an indirect parent of the specified type.
public virtual bool HasIndirectParent<T>() where T : AbstractControl
Returns
Type Parameters
TThe type of the parent to search for. Must derive from AbstractControl.
Remarks
An indirect parent is any ancestor in the parent hierarchy, excluding the current control itself. The method traverses the hierarchy recursively until it finds a parent of the specified type or reaches the root.