UWP - Canvas example

MainPage.xaml

<Page
    x:Class="UniversalAppTutorials.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UniversalAppTutorials"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    >
    <!--
        Canvas
            Defines an area within which you can explicitly
            position child objects, using coordinates that
            are relative to the Canvas area.

        Canvas.ZIndex
            Gets or sets the Z-order of an element when that
            element is presented in its parent Canvas layout container.
    -->
    <Canvas Background="AliceBlue">
        <Ellipse
            Width="100"
            Height="100"
            Fill="Red"
            Canvas.Left="100"
            Canvas.Top="100"
            Canvas.ZIndex="2"
            />
        <Ellipse
            Width="100"
            Height="100"
            Fill="Green"
            Canvas.Left="150"
            Canvas.Top="100"
            Canvas.ZIndex="1"
            />
        <Ellipse
            Width="100"
            Height="100"
            Fill="Blue"
            Canvas.Left="150"
            Canvas.Top="150"
            Canvas.ZIndex="0"
            />
        <Ellipse
            Width="100"
            Height="100"
            Fill="Yellow"
            Canvas.Left="200"
            Canvas.Top="200"
            />
        <Ellipse
            Width="100"
            Height="100"
            Fill="HotPink"
            Canvas.Left="250"
            Canvas.Top="250"
            Canvas.ZIndex="1"
            />
    </Canvas>
</Page>
More uwp tutorials