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!