VisualTreeExtensions

StockSharp.Xaml.Charting.Common.Extensions

Provides useful extensions for working with the visual tree.

Methods

GetLogicalChildren
internal static IEnumerable<FrameworkElement> GetLogicalChildren(FrameworkElement parent)
result = VisualTreeExtensions.GetLogicalChildren(parent)

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.

parent
The parent framework element.

Returns: The logical children of the framework element.

GetVisualAncestors
internal static IEnumerable<DependencyObject> GetVisualAncestors(DependencyObject element)
result = VisualTreeExtensions.GetVisualAncestors(element)

Get the visual tree ancestors of an element.

element
The element.

Returns: The visual tree ancestors of the element.

GetVisualAncestorsAndSelf
internal static IEnumerable<DependencyObject> GetVisualAncestorsAndSelf(DependencyObject element)
result = VisualTreeExtensions.GetVisualAncestorsAndSelf(element)

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

element
The element.

Returns: The visual tree ancestors of an element and the element itself.

GetVisualAncestorsAndSelfIterator
private static IEnumerable<DependencyObject> GetVisualAncestorsAndSelfIterator(DependencyObject element)
result = VisualTreeExtensions.GetVisualAncestorsAndSelfIterator(element)

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

element
The element.

Returns: The visual tree ancestors of an element and the element itself.

GetVisualChildren
internal static IEnumerable<DependencyObject> GetVisualChildren(DependencyObject element)
result = VisualTreeExtensions.GetVisualChildren(element)

Get the visual tree children of an element.

element
The element.

Returns: The visual tree children of an element.

GetVisualChildrenAndSelf
internal static IEnumerable<DependencyObject> GetVisualChildrenAndSelf(DependencyObject element)
result = VisualTreeExtensions.GetVisualChildrenAndSelf(element)

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

element
The element.

Returns: The visual tree children of an element and the element itself.

GetVisualChildrenAndSelfIterator
private static IEnumerable<DependencyObject> GetVisualChildrenAndSelfIterator(DependencyObject element)
result = VisualTreeExtensions.GetVisualChildrenAndSelfIterator(element)

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

element
The element.

Returns: The visual tree children of an element and the element itself.

GetVisualDescendants
internal static IEnumerable<DependencyObject> GetVisualDescendants(DependencyObject element)
result = VisualTreeExtensions.GetVisualDescendants(element)

Get the visual tree descendants of an element.

element
The element.

Returns: The visual tree descendants of an element.

GetVisualDescendantsAndSelf
internal static IEnumerable<DependencyObject> GetVisualDescendantsAndSelf(DependencyObject element)
result = VisualTreeExtensions.GetVisualDescendantsAndSelf(element)

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

element
The element.

Returns: The visual tree descendants of an element and the element itself.

GetVisualDescendantsAndSelfIterator
private static IEnumerable<DependencyObject> GetVisualDescendantsAndSelfIterator(DependencyObject element)
result = VisualTreeExtensions.GetVisualDescendantsAndSelfIterator(element)

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

element
The element.

Returns: The visual tree descendants of an element and the element itself.

GetVisualSiblings
internal static IEnumerable<DependencyObject> GetVisualSiblings(DependencyObject element)
result = VisualTreeExtensions.GetVisualSiblings(element)

Get the visual tree siblings of an element.

element
The element.

Returns: The visual tree siblings of an element.

GetVisualSiblingsAndSelf
internal static IEnumerable<DependencyObject> GetVisualSiblingsAndSelf(DependencyObject element)
result = VisualTreeExtensions.GetVisualSiblingsAndSelf(element)

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

element
The element.

Returns: The visual tree siblings of an element and the element itself.

InvokeOnLayoutUpdated
internal static void InvokeOnLayoutUpdated(FrameworkElement element, Action action)
VisualTreeExtensions.InvokeOnLayoutUpdated(element, action)

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

element
The element.
action
The action to perform.