C# Класс Microsoft.Silverlight.Testing.Controls.VisualTreeExtensions

Provides useful extensions for working with the visual tree.
Since many of these extension methods are declared on types like DependencyObject high up in the class hierarchy, we've placed them in the Primitives namespace which is less likely to be imported for normal scenarios.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetBoundsRelativeTo ( this element, UIElement otherElement ) : Rect?

Get the bounds of an element relative to another element.

GetVisualAncestors ( this element ) : IEnumerable

Get the visual tree ancestors of an element.

GetVisualAncestorsAndSelf ( this element ) : IEnumerable

Get the visual tree ancestors of an element and the element itself.

GetVisualChildren ( this element ) : IEnumerable

Get the visual tree children of an element.

GetVisualChildrenAndSelf ( this element ) : IEnumerable

Get the visual tree children of an element and the element itself.

GetVisualDescendants ( this element ) : IEnumerable

Get the visual tree descendants of an element.

GetVisualDescendantsAndSelf ( this element ) : IEnumerable

Get the visual tree descendants of an element and the element itself.

GetVisualSiblings ( this element ) : IEnumerable

Get the visual tree siblings of an element.

GetVisualSiblingsAndSelf ( this element ) : IEnumerable

Get the visual tree siblings of an element and the element itself.

InvokeOnLayoutUpdated ( this element, System.Action action ) : void

Perform an action when the element's LayoutUpdated event fires.

Приватные методы

Метод Описание
GetLogicalChildren ( this parent ) : IEnumerable

Retrieves all the logical children of a framework element using a breadth-first search. For performance reasons this method manually manages the stack instead of using recursion.

GetLogicalDescendents ( this parent ) : IEnumerable

Retrieves all the logical descendents of a framework element using a breadth-first search. For performance reasons this method manually manages the stack instead of using recursion.

GetVisualAncestorsAndSelfIterator ( DependencyObject element ) : IEnumerable

Get the visual tree ancestors of an element and the element itself.

GetVisualChildrenAndSelfIterator ( this element ) : IEnumerable

Get the visual tree children of an element and the element itself.

GetVisualDescendantsAndSelfIterator ( DependencyObject element ) : IEnumerable

Get the visual tree descendants of an element and the element itself.

Описание методов

GetBoundsRelativeTo() публичный статический Метод

Get the bounds of an element relative to another element.
/// is null. /// /// is null. ///
public static GetBoundsRelativeTo ( this element, UIElement otherElement ) : Rect?
element this The element.
otherElement UIElement /// The element relative to the other element. ///
Результат Rect?

GetVisualAncestors() публичный статический Метод

Get the visual tree ancestors of an element.
/// is null. ///
public static GetVisualAncestors ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualAncestorsAndSelf() публичный статический Метод

Get the visual tree ancestors of an element and the element itself.
/// is null. ///
public static GetVisualAncestorsAndSelf ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualChildren() публичный статический Метод

Get the visual tree children of an element.
/// is null. ///
public static GetVisualChildren ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualChildrenAndSelf() публичный статический Метод

Get the visual tree children of an element and the element itself.
/// is null. ///
public static GetVisualChildrenAndSelf ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualDescendants() публичный статический Метод

Get the visual tree descendants of an element.
/// is null. ///
public static GetVisualDescendants ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualDescendantsAndSelf() публичный статический Метод

Get the visual tree descendants of an element and the element itself.
/// is null. ///
public static GetVisualDescendantsAndSelf ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualSiblings() публичный статический Метод

Get the visual tree siblings of an element.
/// is null. ///
public static GetVisualSiblings ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

GetVisualSiblingsAndSelf() публичный статический Метод

Get the visual tree siblings of an element and the element itself.
/// is null. ///
public static GetVisualSiblingsAndSelf ( this element ) : IEnumerable
element this The element.
Результат IEnumerable

InvokeOnLayoutUpdated() публичный статический Метод

Perform an action when the element's LayoutUpdated event fires.
/// is null. /// /// is null. ///
public static InvokeOnLayoutUpdated ( this element, System.Action action ) : void
element this The element.
action System.Action The action to perform.
Результат void