Returns a collection of visual elements that contain specified object, and the ancestors of specified object.

Namespace: FirstFloor.Documents
Assembly: FirstFloor.Documents (in FirstFloor.Documents.dll) Version: 2.5.0.0 (2.5.1.0)

Syntax

C#
public static IEnumerable<DependencyObject> AncestorsAndSelf(
	this DependencyObject o
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function AncestorsAndSelf ( _
	o As DependencyObject _
) As IEnumerable(Of DependencyObject)
Visual C++
[ExtensionAttribute]
public:
static IEnumerable<DependencyObject^>^ AncestorsAndSelf(
	DependencyObject^ o
)

Parameters

o
Type: System.Windows..::..DependencyObject
The dependency object.

Return Value

A collection that contains the ancestors elements and the object itself.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also