[This is preliminary documentation and is subject to change.]
Finds first visual child of given DependencyObject of specific type which conforms to given condition
Namespace: Tools.WindowsT.WPFAssembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
public static T FindVisualChild<T>( this DependencyObject parent, Func<T, bool> condition ) where T : DependencyObject |
| Visual Basic |
|---|
<ExtensionAttribute> _ Public Shared Function FindVisualChild(Of T As DependencyObject) ( _ parent As DependencyObject, _ condition As Func(Of T, Boolean) _ ) As T |
| Visual C++ |
|---|
[ExtensionAttribute] public: generic<typename T> where T : DependencyObject static T FindVisualChild( DependencyObject^ parent, Func<T, bool>^ condition ) |
| F# |
|---|
static member FindVisualChild : parent:DependencyObject * condition:Func<'T, bool> -> 'T when 'T : DependencyObject |
| JScript |
|---|
|
Parameters
- parent
- Type: System.Windows..::..DependencyObject
A DependencyObject to search for visual child of
- condition
- Type: System..::..Func<(Of <(<'T, Boolean>)>)>
Function evaluated for each visual child of parent which is of type T until conforming child is found
Type Parameters
- T
- Type of child to search for
Return Value
First visual child of parent which is of type T and which conforms to condition; null when no such child can be foundUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | parent is null -or- condition is null |
See Also
Version History
1.3.5
- (Nightly) This function is new in version 1.3.5