title: How to get UIElement at specific position in ItemsControl in WP7?
body: <p>I filled the <code>icBoard</code> with 50 <code>Cell</code> objects, so each <code>Rectangle</code> object has <code>Cell</code> as data object. Now, I want according to index or cell object to get the corresponding <code>Rectangle</code> element. For example I want to get the <code>Rectangle</code> in <code>index=15</code>. Not it's data but the <code>Rectangle</code> itself.</p>
  
  <p>How I can do this?</p>
  
  <pre><code>        public MainPage()
          {
              InitializeComponent();
  
              var cells = new List&lt;Cell&gt;();    
              for (int i = 0; i &lt; 50; i++)
              {
                  cells.Add(new Cell());
              }    
              icCells.ItemsSource = cells;
          }
         public void sector_Tap(object sender, System.Windows.Input.GestureEventArgs e)
         {
              //some code
              //....
              var tappedRectangle = (sender as Rectangle);
              var spesificRectangle = SOMEHOW_GET_RECTANGLE_AT_POSITION_15;
         }
      &lt;ItemsControl Name="icBoard" Grid.Column="0" Margin="0"&gt;
                  &lt;ItemsControl.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;Rectangle  Fill="#501e4696" Width="30" Height="30" Margin="1" Tap="sector_Tap" /&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ItemsControl.ItemTemplate&gt;
                  &lt;ItemsControl.ItemsPanel&gt;
                      &lt;ItemsPanelTemplate&gt;
                          &lt;toolkit:WrapPanel /&gt;
                      &lt;/ItemsPanelTemplate&gt;
                  &lt;/ItemsControl.ItemsPanel&gt;
              &lt;/ItemsControl&gt;
  </code></pre>