Class DependencyObjectHelper
public static class DependencyObjectHelper
- Inheritance
-
DependencyObjectHelper
- Inherited Members
Methods
GetSelfAndAncestors(DependencyObject)
This method will use the VisualTreeHelper.GetParent method to do a depth first walk up the visual tree and return all ancestors of the specified object, including the object itself.
public static IEnumerable<DependencyObject> GetSelfAndAncestors(this DependencyObject dependencyObject)
Parameters
dependencyObject
DependencyObjectThe object in the visual tree to find ancestors of.
Returns
- IEnumerable<DependencyObject>
Returns itself an all ancestors in the visual tree.