Table of Contents

Method HasIndirectParent

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

HasIndirectParent(AbstractControl?)

Gets whether one of this control's parents equals testParent.

public virtual bool HasIndirectParent(AbstractControl? testParent)

Parameters

testParent AbstractControl

Control to test as an indirect parent.

Returns

bool

HasIndirectParent<T>()

Determines whether the current control has an indirect parent of the specified type.

public virtual bool HasIndirectParent<T>() where T : AbstractControl

Returns

bool

true if an indirect parent of type T exists in the parent hierarchy; otherwise, false.

Type Parameters

T

The 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.