I create a Grid, each element of which has a couple of buttons, and I want to make various manipulations by clicking on one of the buttons. Here is the xaml:
<GridView Name="list" IsItemClickEnabled="True" Margin="0,90,0,0"> <GridView.ItemTemplate> <DataTemplate > <StackPanel Margin="10"> <Image Width="200" Height="200" Source="{Binding ImagePath}" /> <Grid Background="#7F9BD1D4" Height="Auto" > <Grid.ColumnDefinitions> <ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> <Button Name="Car" Grid.Column="0" Content="Машина" HorizontalAlignment="Stretch" Background="#7F9BD1D4" Foreground="White" Click="Button_Click"/> <Button Name="Cat" Grid.Column="1" Content="Кошка" HorizontalAlignment="Stretch" IsEnabled="{Binding Act}" Background="#7F9BD1D4" Foreground="White"/> </Grid> <TextBlock FontSize="16" Text="{Binding Title}" HorizontalAlignment="Center"/> </StackPanel> </DataTemplate> </GridView.ItemTemplate> </GridView> Here is the great code
private void Button_Click(object sender, RoutedEventArgs e) { Car.Visibility = Visibility.Collapsed; } 
Caruse((Button)sender)? - VladD<Image Width="200" Height="200" Source="{Binding ImagePath}" />) I can not to figure out how to display an image with an item in which the button is located ... - Denisok