Method GetTopSpecialParent
GetTopSpecialParent<T>(Element?)
Searches for the highest-level parent of type
T
in the element hierarchy.
public static T? GetTopSpecialParent<T>(Element? view) where T : Element
Parameters
view
ElementThe element whose topmost parent is to be found.
Returns
- T
The topmost parent of type
T
, or null if none is found.
Type Parameters
T
The type of the parent element to find.