private void chooseItem( object sender, MouseButtonEventArgs e ) { if (current!=null) current.Background = new SolidColorBrush( Color.FromArgb( 2, 114, 174, 209 ) ); ( (MyTextBlock)sender ).Background = new SolidColorBrush(Color.FromArgb(204,23,116,180)); current = (MyTextBlock)sender; }
private void chooseItem(object sender, MouseButtonEventArgs e) { if (current != null) { current.Background = new SolidColorBrush(Color.FromArgb(2, 114, 174, 209)); } ((MyTextBlock)sender).Background = new SolidColorBrush(Color.FromArgb(204, 23, 116, 180)); current = (MyTextBlock)sender; }