title: How to make a transparent canvas over an image in WPF?
body: <p>I want to make the GameArea Canvas on top of the image1 Image. I've tried to change the ZIndex and drag the canvas manually to the Image's top, but neither worked, the Canvas keeps moving back to the rightside of the Image. </p>
  
  <p>(Sorry if my english is rather clunky, hope you understand what i mean)</p>
  
  <p>Below is my code :</p>
  
  <pre><code>&lt;Window x:Class="TugasBesarTAM_Moses_1072089.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Brickbreaker" Height="420" Width="375" Loaded="Window_Loaded"
      KeyDown="Window_KeyDown" ResizeMode="NoResize"&gt;
  &lt;DockPanel&gt;      
      &lt;Grid Width="350" Height="30"
            DockPanel.Dock="Top"
            ShowGridLines="True"&gt;
  
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition/&gt;
              &lt;ColumnDefinition/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition/&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;TextBlock x:Name="txtLevel" 
                     Text="Level 00"
                     Grid.Column="0" Grid.Row="1"
                     FontSize="20" FontWeight="Medium"
                     HorizontalAlignment="Left"/&gt;
          &lt;TextBlock x:Name="txtScore" 
                     Text="0"
                     Grid.Column="1" Grid.Row="1"
                     FontSize="20" FontWeight="Medium"
                     HorizontalAlignment="Right"/&gt;
      &lt;/Grid&gt;
      &lt;Image Height="300" Name="image1" Stretch="Fill" Width="320" Visibility="Visible" Source="/TugasBesarTAM_Moses_1072089;component/Images/Back1.jpg" Panel.ZIndex="1" /&gt;
      &lt;Canvas x:Name="GameArea" DockPanel.Dock="Bottom" Width="320" Height="300" Panel.ZIndex="0"&gt;
  
      &lt;/Canvas&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks for your attention and assistance!</p>