Table of Contents

Class Extensions

Namespace
HeBianGu.Control.Dock.Controls
Assembly
HeBianGu.Control.Dock.dll
public static class Extensions
Inheritance
Extensions
Inherited Members

Methods

FindLogicalAncestor<T>(DependencyObject)

Finds the first ancestor of a specific type in the logical tree / visual tree.

public static T FindLogicalAncestor<T>(this DependencyObject dependencyObject) where T : class

Parameters

dependencyObject DependencyObject

The dependency object to find ancestor for.

Returns

T

The ancestor, or null if no match found.

Type Parameters

T

The type to search for.

Remarks

FindLogicalChildren<T>(DependencyObject)

Finds all the children in the logical tree of a specific type from a certain point.

public static IEnumerable<T> FindLogicalChildren<T>(this DependencyObject depObj) where T : DependencyObject

Parameters

depObj DependencyObject

The starting point for the search.

Returns

IEnumerable<T>

All the children found.

Type Parameters

T

The type to search for.

Remarks

Uses LogicalTreeHelper internally.

FindVisualAncestor<T>(DependencyObject)

Finds the first ancestor of a specific type in the visual tree.

public static T FindVisualAncestor<T>(this DependencyObject dependencyObject) where T : class

Parameters

dependencyObject DependencyObject

The dependency object to find ancestor for.

Returns

T

The ancestor, or null if no match found.

Type Parameters

T

The type to search for.

Remarks

Uses GetParent(DependencyObject) internally.

FindVisualChildren<T>(DependencyObject)

Finds all the children in the visual tree of a specific type from a certain point.

public static IEnumerable<T> FindVisualChildren<T>(this DependencyObject depObj) where T : DependencyObject

Parameters

depObj DependencyObject

The starting point for the search.

Returns

IEnumerable<T>

All the children found.

Type Parameters

T

The type to search for.

Remarks

Uses VisualTreeHelper internally.

FindVisualTreeRoot(DependencyObject)

Finds the visual root in the visual/logical tree.

public static DependencyObject FindVisualTreeRoot(this DependencyObject initial)

Parameters

initial DependencyObject

The stating element.

Returns

DependencyObject

The root for this branch.

Remarks