Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I access the bound value of a Button?
    primarykey
    data
    text
    <p>I have the following XAML</p> <pre><code>&lt;Window.Resources&gt; &lt;DataTemplate x:Key="SelectButtonColumnDataTemplate"&gt; &lt;Button Content="Select" Command="{Binding SelectItemCommand}" Click="SelectButtonClick" /&gt; &lt;/DataTemplate&gt; &lt;/Window.Resources&gt; &lt;Grid x:Name="LayoutRoot"&gt; &lt;ListView x:Name="listFeedSearch" HorizontalAlignment="Left" Width="542.5" RenderTransformOrigin="0.5,0.5" ItemsSource="{Binding SearchCollection}"&gt; &lt;ListView.RenderTransform&gt; &lt;TransformGroup&gt; &lt;ScaleTransform/&gt; &lt;SkewTransform/&gt; &lt;RotateTransform/&gt; &lt;TranslateTransform/&gt; &lt;/TransformGroup&gt; &lt;/ListView.RenderTransform&gt; &lt;ListView.View&gt; &lt;GridView&gt; &lt;GridViewColumn Width="150" Header="Feed Name" x:Name="listFeedSearchName" DisplayMemberBinding="{Binding FeedName}" /&gt; &lt;GridViewColumn Width="280" Header="Feed Address" x:Name="listFeedSearchAddress" DisplayMemberBinding="{Binding FeedUrl}" /&gt; &lt;GridViewColumn Width="100" Header=" " CellTemplate="{StaticResource SelectButtonColumnDataTemplate}" /&gt; &lt;/GridView&gt; &lt;/ListView.View&gt; &lt;/ListView&gt; &lt;/Grid&gt; </code></pre> <p>Add the following Event Handler:</p> <pre><code>private void SelectButtonClick(object sender, RoutedEventArgs e) { } </code></pre> <p>What I would like to do is output that rows individual binded value.</p> <p>How would I do this, I know it's something along the lines of:</p> <pre><code>var data = (sender as Button)... </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload