C# Class 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.
Afficher le fichier Open project: garyjohnson/wpnest

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

GetBoundsRelativeTo() public static méthode

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. ///
Résultat Rect?

GetVisualAncestors() public static méthode

Get the visual tree ancestors of an element.
/// is null. ///
public static GetVisualAncestors ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualAncestorsAndSelf() public static méthode

Get the visual tree ancestors of an element and the element itself.
/// is null. ///
public static GetVisualAncestorsAndSelf ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualChildren() public static méthode

Get the visual tree children of an element.
/// is null. ///
public static GetVisualChildren ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualChildrenAndSelf() public static méthode

Get the visual tree children of an element and the element itself.
/// is null. ///
public static GetVisualChildrenAndSelf ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualDescendants() public static méthode

Get the visual tree descendants of an element.
/// is null. ///
public static GetVisualDescendants ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualDescendantsAndSelf() public static méthode

Get the visual tree descendants of an element and the element itself.
/// is null. ///
public static GetVisualDescendantsAndSelf ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualSiblings() public static méthode

Get the visual tree siblings of an element.
/// is null. ///
public static GetVisualSiblings ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

GetVisualSiblingsAndSelf() public static méthode

Get the visual tree siblings of an element and the element itself.
/// is null. ///
public static GetVisualSiblingsAndSelf ( this element ) : IEnumerable
element this The element.
Résultat IEnumerable

InvokeOnLayoutUpdated() public static méthode

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.
Résultat void