Show / Hide Table of Contents

Class DependencyObjectHelper

Inheritance
System.Object
DependencyObjectHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Interactivity
Assembly: OpenSilver.Interactivity.dll
Syntax
public static class DependencyObjectHelper

Methods

| Improve this Doc View Source

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.

Declaration
public static IEnumerable<DependencyObject> GetSelfAndAncestors(this DependencyObject dependencyObject)
Parameters
Type Name Description
DependencyObject dependencyObject

The object in the visual tree to find ancestors of.

Returns
Type Description
System.Collections.Generic.IEnumerable<DependencyObject>

Returns itself an all ancestors in the visual tree.

  • Improve this Doc
  • View Source