VisualTreeHelper.GetChildrenCount Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns the number of children that exists in an object's child collection in the visual tree.
Assembly: System.Windows (in System.Windows.dll)
Parameters
- reference
- Type: System.Windows.DependencyObject
The source visual.
| Exception | Condition |
|---|---|
| InvalidOperationException | reference is null, or is not a valid UIElement. |
Show: