[]
        
(Showing Draft Content)

C1.WinUI.Core.VTreeHelper.GetFirstParent

GetFirstParent Method

GetFirstParent(DependencyObject, IList<Type>, DependencyObject)

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.

Declaration
public static DependencyObject GetFirstParent(DependencyObject reference, IList<Type> types, DependencyObject endObject)
Parameters
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.

Returns
Type Description
DependencyObject

The parent of the visual.