Show / Hide Table of Contents

Class VisualTreeExtensions

Contains static methods for helping with WPF visual tree operations

Inheritance
System.Object
VisualTreeExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Views
Assembly: Phoenix.Abstractions.Views.dll
Syntax
public static class VisualTreeExtensions

Methods

View Source

FindChild<T>(DependencyObject)

Finds a strongly typed child in the visual tree.

Declaration
public static T FindChild<T>(DependencyObject parent)
    where T : DependencyObject
Parameters
Type Name Description
System.Windows.DependencyObject parent

The element to search for the child of.

Returns
Type Description
T

The strongly typed child or null if no match was found.

Type Parameters
Name Description
T

The type of the child to find.

View Source

FindVisualParent<T>(UIElement)

Finds a strongly typed parent in the visual tree.

Declaration
public static T FindVisualParent<T>(UIElement element)
    where T : UIElement
Parameters
Type Name Description
System.Windows.UIElement element

The element to search for a parent of.

Returns
Type Description
T

The strongly typed parent or null if no match was found.

Type Parameters
Name Description
T

The type of parent to find.

  • View Source
In This Article
Back to top Generated by DocFX