❔ Buttons xaml
I have 55 buttons and I want to change the text in each of them after clicking, how can I do this without repeating the code 55 times in each method button1_Click, button2_Click, like this: button1.Text = "+";, button2.Text = "+"


55 times in each methodprivate void NameAllButtons()
{
}string MyButtonNames = "Test"Button.(button1's name) = MyButtonNames;Button.(button1's name) = MyButtonNames;string MyButtonNames = "Test"
private void NameAllButtons()
{
Button.(button1's name) = MyButtonNames;
}private void Button1_Click(object sender, RoutedEventArgs e)
{
NameAllButtons();
}string MyButtonNames = (Whatever you want);