View.Layers Property
Gets the list of layers to be drawn in the view.
Syntax
public LayerCollection Layers { get; }
Property Value
Default: Empty collection.
The layers that are drawn in the view.
Remarks
The position in the list defines draw order, the first layer is drawn first.
Example
// Move the first layer to the end to draw it on top of all other layers
public static void MoveFirstLayerToEnd(View view)
{
// Get the first layer from the view
Layer firstLayer = view.Layers[0];
// A layer can only be inserted once in a layer hierarchy so we must remove
// it before we can insert it at a new position
view.Layers.Remove(firstLayer);
// Reinsert the first layer at the end to draw it on top of all other layers
view.Layers.Add(firstLayer);
// Update the View
view.Update();
}
Platforms
Windows, Linux, Android