Click or drag to resize

ExtensionsFindVisualChildByName Method

Searches for a specified visual element in the child tree by name

Namespace:  Cauldron.XAML
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static FrameworkElement FindVisualChildByName(
	this DependencyObject element,
	string name
)

Parameters

element
Type: System.WindowsDependencyObject
The object to find the child object for. This is expected to be either a FrameworkElement or a FrameworkContentElement.
name
Type: SystemString
The name of the child to find

Return Value

Type: FrameworkElement
The instance of the child with the given name, otherwise null

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 Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also