Class WPFVisualTreeHelper
Stellt hilfsfunktionen für den WPF-Visual-Tree bereit
Inheritance
System.Object
WPFVisualTreeHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Simplic.Framework.Base.dll
Syntax
public class WPFVisualTreeHelper
Methods
|
Improve this Doc
View Source
FindAncestor<T>(DependencyObject)
Declaration
public static T FindAncestor<T>(DependencyObject dependencyObject)
where T : class
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
dependencyObject |
|
Returns
Type Parameters
|
Improve this Doc
View Source
FindChild<T>(DependencyObject)
Find a child by a specific type
Declaration
public static T FindChild<T>(DependencyObject control)
where T : DependencyObject
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
control |
Control to start searching from
|
Returns
Type |
Description |
T |
Dependencie object
|
Type Parameters
Name |
Description |
T |
Type to return
|
|
Improve this Doc
View Source
FindChild<T>(DependencyObject, String)
Finds a Child of a given item in the visual tree.
Declaration
public static T FindChild<T>(DependencyObject parent, string childName)
where T : DependencyObject
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
parent |
A direct parent of the queried item.
|
System.String |
childName |
x:Name or Name of child.
|
Returns
Type |
Description |
T |
The first parent item that matches the submitted type parameter.
If not matching item can be found,
a null parent is being returned.
|
Type Parameters
Name |
Description |
T |
The type of the queried item.
|
|
Improve this Doc
View Source
FindChildControl<T>(DependencyObject)
Sucht ein Kind-Element eines bestimmten Typs
Declaration
public static DependencyObject FindChildControl<T>(DependencyObject control)
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
control |
Control ab dem gesucht wird
|
Returns
Type |
Description |
System.Windows.DependencyObject |
Dependencie object
|
Type Parameters
Name |
Description |
T |
Type des Kind-Elements
|
|
Improve this Doc
View Source
FindChildFrameworkElement(DependencyObject, String)
Finds a Child of a given item in the visual tree.
Declaration
public static FrameworkElement FindChildFrameworkElement(DependencyObject parent, string childName)
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
parent |
A direct parent of the queried item.
|
System.String |
childName |
x:Name or Name of child.
|
Returns
Type |
Description |
System.Windows.FrameworkElement |
The first parent item that matches the submitted type parameter.
If not matching item can be found,
a null parent is being returned.
|
|
Improve this Doc
View Source
FindChildren<T>(DependencyObject)
Enumerates over the VisualTree and returns all children of given type
Declaration
public static IEnumerable<T> FindChildren<T>(DependencyObject depObj)
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
depObj |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
FindParent<T>(DependencyObject)
Sucht ein Vater-Element eines bestimmten Typs
Declaration
public static T FindParent<T>(DependencyObject child)
where T : DependencyObject
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
child |
Control ab dem gesucht wird
|
Returns
Type |
Description |
T |
Dependencie object
|
Type Parameters
Name |
Description |
T |
Type des Vater-Elements
|
|
Improve this Doc
View Source
FindVisualChildren<T>(DependencyObject)
Enumerates over all VisualChildren of the given type
Declaration
public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj)
where T : DependencyObject
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
depObj |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
FindVisualChildren<I>(DependencyObject, IList<DependencyObject>)
Enumerates over all VisualChildren which inherits from a specific type
Declaration
public static IEnumerable<DependencyObject> FindVisualChildren<I>(DependencyObject depObj, IList<DependencyObject> interfaceList)
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
depObj |
|
System.Collections.Generic.IList<System.Windows.DependencyObject> |
interfaceList |
Interface list
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Windows.DependencyObject> |
|
Type Parameters
|
Improve this Doc
View Source
GetLogicalParent<T>(DependencyObject)
Declaration
public static T GetLogicalParent<T>(DependencyObject p_oElement)
where T : DependencyObject
Parameters
Type |
Name |
Description |
System.Windows.DependencyObject |
p_oElement |
|
Returns
Type Parameters