private void button1Show_Checked(object sender, RoutedEventArgs e) { var checkBox = (CheckBox)sender; if (checkBox.IsChecked.Value) ApplicationBar.Buttons.Insert(0, button1); else ApplicationBar.Buttons.Remove(button1); }