Hi,
i got a form with 10 button and i want to get the button name of the mouse click in a string variable
i tried this:
private void Button_Click(object sender, RoutedEventArgs e)
{
string buttonName = "";
if (sender is Button)
{
buttonName = ((Button)sender).Name;
MessageBox.Show(buttonName);
}
}
but i get no message;
Also i was thinking something like a OnMouseClick event but i didn't play with the events and handlers too much and i don't know how to use them.