private void Button_Click(object sender, RoutedEventArgs e){
Button btn = (Button)sender;
if(/*insert if condition here*/)
{
cntr = 1;
void1();
}
}
I'm currently developing a C# Windows store app. I have a TextBlock that can have a text of either Red, Orange, Yellow, Green, Blue, Indigo or Violet. I also have seven buttons with different background colors. Now, I want to check if the text of my TextBlock matches the backgound color of the Button clicked.
Aucun commentaire:
Enregistrer un commentaire