ContainerVisual::GetVisualChild Method (Int32)
Returns a specified child Visual for the parent ContainerVisual.
Assembly: PresentationCore (in PresentationCore.dll)
Parameters
- index
-
Type:
System::Int32
A 32-bit signed integer that represents the index value of the child Visual. The value of index must be between 0 and VisualChildrenCount - 1.
By default, a ContainerVisual does not have any children.
Notes to Inheritors:
The visual tree cannot be modified during this call.
The following example shows how to create a ContainerVisual object that is used as the parent for two DrawingVisual objects. Objects that are added to the ContainerVisual object must be added in reverse z-order (bottom to top) to ensure they are rendering in the correct drawing order. In order for the visual tree to be enumerated correctly, the example provides overridden implementations of the GetVisualChild method and VisualChildrenCount property.
Available since 3.0