ElementCompositionPreview.SetElementChildVisual(UIElement, Visual) ElementCompositionPreview.SetElementChildVisual(UIElement, Visual) ElementCompositionPreview.SetElementChildVisual(UIElement, Visual) ElementCompositionPreview.SetElementChildVisual(UIElement, Visual) Method

Definition

Sets a custom Windows.UI.Composition.Visual as the last child of the element’s visual tree.

public : static void SetElementChildVisual(UIElement element, Visual visual)
static void SetElementChildVisual(UIElement element, Visual visual) const;
public static void SetElementChildVisual(UIElement element, Visual visual)
Public Shared Sub SetElementChildVisual(element As UIElement, visual As Visual)

Parameters

element
UIElement UIElement

The element to add the child Visual to.

visual
Visual Visual

The Visual to add to the element's visual tree.

Additional features and requirements

Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

The Visual is added as the last child, therefore on top of the rest of the element in z-order.