title: Coordinates in WPF Canvas
body: <p>when defining coordinates for canvas shapes in XAML files, is it possible to do something like this:</p>
  
  <pre><code>&lt;Canvas x:Name="myCanvas"
          DockPanel.Dock="Bottom"
          VerticalAlignment="Stretch"&gt;
  
      &lt;Canvas.Background&gt;
          &lt;SolidColorBrush Color="White" Opacity="100" /&gt;
      &lt;/Canvas.Background&gt;
  
      &lt;Ellipse x:Name="ell1"
                  Width="30"
                  Height="30"
                  Stroke="Black"
                  StrokeThickness="1"
                  Fill="Red" 
                  Canvas.Left="100"
                  Canvas.Top="50" /&gt;
  
      &lt;Ellipse x:Name="ell2"
                  Width="30"
                  Height="30"
                  Stroke="Black"
                  StrokeThickness="1"
                  Fill="Red" 
                  Canvas.Right="100"
                  Canvas.Top="50" /&gt;
  
      &lt;Line Stroke="Black"
              StrokeThickness="1" 
              X1="ell1.Canvas.Right"                              *** look here ***
              Y1="ell1.Canvas.Top + ell1.Height/2"                *** look here ***
              X2="ell2.Canvas.Left"                               *** look here ***
              Y2="ell2.Canvas.Top + ell2.Height/2" /&gt;             *** look here ***
  
  &lt;/Canvas&gt;
  </code></pre>
  
  <p>Or the only way of doing it is through C#?</p>
  
  <p>Thanks,
  Massimo</p>