title: Silverlight 3 - Data Binding Position of a rectangle on a canvas
body: <p>I am currently trying to bind a collection of objects to a Canvas in Silverlight 3 using an ItemsControl as below:</p>
  
  <pre><code>&lt;ItemsControl x:Name="ctrl" ItemsSource="{Binding myObjectsCollection}"&gt;
      &lt;ItemsControl.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;Canvas&gt;&lt;/Canvas&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ItemsControl.ItemsPanel&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Rectangle Stroke="LightGray" Fill="Black"  StrokeThickness="2" 
                     RadiusX="15" RadiusY="15" Canvas.Left="{Binding XAxis}"
                     Height="25" Width="25"&gt;
              &lt;/Rectangle&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>Unfortunately it seems the binding on the Canvas.Left is being ignored. From what i have learned <a href="http://betaforums.silverlight.net/forums/p/116384/262984.aspx" rel="noreferrer">here</a> it would appear this is due to the items being placed inside a content presenter not the actual canvas i have specified in the items panel.</p>
  
  <p>Is there a way i can use data binding to determine the position of elements on a canvas?</p>