private void Button_Click_4(object sender, RoutedEventArgs e) { string Tag = "right"; Button t = sender as Button; if (t.Tag != null) { Tag = "left"; } ScoreView r = new ScoreView(this.SelectedEmployee, ScoreView.ScoreViewType.Rula, Tag); r.Show(); }