title: how to get click event in itemTemplate
body: <p>I have a gridView.<br>
  ıt has an Itemptemplate (textblock, image) and itemsource. textBlock and Image are binded to itemsource.
  I want to add a button to ItempTemplate but I couldn't able to detect the eventHandler.
  In my .cs file I dont see textblock, image or button.
  how can I set the event,</p>
  
  <p>here is the code of item template</p>
  
  <pre><code>&lt;DataTemplate x:Key="IDViewStyle"&gt;
          &lt;Grid Width="350" Height="450" &gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition/&gt;
                  &lt;RowDefinition Height="40"/&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Grid&gt;
                  &lt;Border Background="#B2060606" /&gt;
                  &lt;Button HorizontalAlignment="Right" BorderThickness="0" x:Name="eraseButton" VerticalAlignment="Top"&gt;
                      &lt;Image Source="/Assets/Images/erease.png" Width="90" Margin="0,-7,-15,15"/&gt;
                  &lt;/Button&gt;
                  &lt;StackPanel Margin="0" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center"&gt;
  
                      &lt;TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="+" VerticalAlignment="Center" Style="{StaticResource PageHeaderTextStyle}" FontSize="160" Margin="0"/&gt;
                      &lt;TextBlock TextWrapping="Wrap" Text="Ekle" TextAlignment="Center" Style="{StaticResource HeaderTextStyle}"/&gt;
                  &lt;/StackPanel&gt;
                  &lt;Image  Stretch="Fill" Source="{Binding Image}"/&gt;
              &lt;/Grid&gt;
  
              &lt;TextBlock TextWrapping="Wrap" Text="{Binding Type}" VerticalAlignment="Top" Grid.Row="1" Style="{StaticResource SubheaderTextStyle}" TextAlignment="Center"/&gt;
          &lt;/Grid&gt;
      &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>and my .cs file </p>
  
  <pre><code>Data.IdentityTypeCollection collection;
  gView.SelectionChanged += lvIdTypes_SelectionChanged;
  collection = new Data.IdentityTypeCollection();
  gView.ItemsSource = collection;
  gView.ScrollIntoView(collection);
  </code></pre>
  
  <p>and my mainpage.xaml </p>
  
  <p><code>&lt;GridView x:Name="gView" Grid.Row="1"  Grid.RowSpan="2" Margin="117,0,0,100"   ItemTemplate="{StaticResource IDViewStyle}"/&gt;</code></p>
  
  <p>how can I use button event in the item template</p>