Canvas.ZIndex (사각형(도형) 포개는 순서 바꾸기)
[FrmCanvasZIndex.xaml]
<UserControl x:Class="RiaCanvasClip.FrmCanvasZIndex"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="400">
<Canvas x:Name="silCanvas" Background="Silver"
Width="200" Height="200">
<Rectangle Canvas.Left="0" Canvas.Top="0" Fill="Red" Width="50" Height="50" Canvas.ZIndex="2" />
<Rectangle Canvas.Left="20" Canvas.Top="20" Fill="Green" Width="50" Height="50" Canvas.ZIndex="1" />
<Rectangle Canvas.Left="40" Canvas.Top="40" Fill="Blue" Width="50" Height="50" Canvas.ZIndex="0" />
</Canvas>
</UserControl>