Method FirstChildOfType
FirstChildOfType<T>()
Retrieves the first child control of the specified type from the collection of children.
public virtual T? FirstChildOfType<T>() where T : AbstractControl
Returns
- T
An instance of type T if a matching child control exists; otherwise, null.
Type Parameters
TThe type of child control to retrieve. Must inherit from AbstractControl.
Remarks
This method searches the immediate children and returns the first control that matches the specified type. If there are no children or no matching child is found, the method returns null.