[]
Returns a Microsoft.UI.Xaml.DependencyObject value that represents the first parent of the visual object which type is one of the specified tyles. Method looks up the visual tree until the desired parent element is found or parent element is equal to the specified endObject.
public static DependencyObject GetFirstParent(DependencyObject reference, IList<Type> types, DependencyObject endObject)
Type | Name | Description |
---|---|---|
DependencyObject | reference | The visual whose parent is returned. |
IList<Type> | types | The IList<T> list of types to search for. |
DependencyObject | endObject | The visual representing the end point of search. |
Type | Description |
---|---|
DependencyObject | The parent of the visual. |