There is a table:

<DataGrid x:Name="dataGrid" AutoGenerateColumns="False" Margin="0,449,0,0" IsReadOnly="True"> <DataGrid.Columns> <DataGridTextColumn Header="Номер ПК" Binding="{Binding Path=Id}"/> <DataGridTextColumn Header="Прізвище" Binding="{Binding Path=First_name}"/> ... </DataGrid.Columns> <DataGrid.RowDetailsTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Button Content="видалити"/> <Button Content="відкрити пк"/> </StackPanel> </DataTemplate> </DataGrid.RowDetailsTemplate> </DataGrid> 

When you click on any line, a line with 2 buttons is generated below it. I do not know how to do it so that when you press it again, help me, pliz help!

  • Not quite clear what is at stake - user227049
  • when you click on the line - it is taken into focus (highlighted). How to get out of focus when you press it again (it is not removed as standard)? - Awesome7997

0