[This is preliminary documentation and is subject to change.]

Finds first visual child of given DependencyObject which conforms to given condition

Namespace: Tools.WindowsT.WPF
Assembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public static DependencyObject FindVisualChild(
	this DependencyObject parent,
	Func<DependencyObject, bool> condition
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function FindVisualChild ( _
	parent As DependencyObject, _
	condition As Func(Of DependencyObject, Boolean) _
) As DependencyObject
Visual C++
[ExtensionAttribute]
public:
static DependencyObject^ FindVisualChild(
	DependencyObject^ parent, 
	Func<DependencyObject^, bool>^ condition
)
F#
static member FindVisualChild : 
        parent:DependencyObject * 
        condition:Func<DependencyObject, bool> -> DependencyObject 
JScript
public static function FindVisualChild(
	parent : DependencyObject, 
	condition : Func<DependencyObject, boolean>
) : DependencyObject

Parameters

parent
Type: System.Windows..::..DependencyObject
A DependencyObject to search for visual child of
condition
Type: System..::..Func<(Of <(<'DependencyObject, Boolean>)>)>
Function evaluated for each visual child of parent until conforming child is found

Return Value

First visual child of parent for which condition returns true; null when no such child can be found

Usage 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 or .

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionparent is null -or- condition is null

See Also

Collapse/expand Version History

1.3.5

  • (Nightly) This function is new in version 1.3.5