[This is preliminary documentation and is subject to change.]
Enumerates all the visual children of given DependencyObject which conform 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 IEnumerable<DependencyObject> FindVisualChildren( this DependencyObject parent, Func<DependencyObject, bool> condition, bool onlyFirstLevel ) |
| Visual Basic |
|---|
<ExtensionAttribute> _ Public Shared Function FindVisualChildren ( _ parent As DependencyObject, _ condition As Func(Of DependencyObject, Boolean), _ onlyFirstLevel As Boolean _ ) As IEnumerable(Of DependencyObject) |
| Visual C++ |
|---|
[ExtensionAttribute] public: static IEnumerable<DependencyObject^>^ FindVisualChildren( DependencyObject^ parent, Func<DependencyObject^, bool>^ condition, bool onlyFirstLevel ) |
| F# |
|---|
static member FindVisualChildren : parent:DependencyObject * condition:Func<DependencyObject, bool> * onlyFirstLevel:bool -> IEnumerable<DependencyObject> |
| JScript |
|---|
public static function FindVisualChildren( parent : DependencyObject, condition : Func<DependencyObject, boolean>, onlyFirstLevel : boolean ) : IEnumerable<DependencyObject> |
Parameters
- parent
- Type: System.Windows..::..DependencyObject
A DependencyObject to look for children in
- condition
- Type: System..::..Func<(Of <(<'DependencyObject, Boolean>)>)>
Condition to be used to filer children objects
- onlyFirstLevel
- Type: System..::..Boolean
True not to look inside objects fulfilling the condition, false to enumerate children of these objects recursivelly.
Return Value
Visual children of parent fulfilling condition. If onlyFirstLevel is false search is done inside these objects as well and objects are returned in in-order order.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
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | parent is null or condition is null. |
See Also
Version History
1.5.3
- This function is new in version 1.5.3