ApplicationBar.MainPage.button1Show_Checked C# (CSharp) Method

button1Show_Checked() private method

private button1Show_Checked ( object sender, RoutedEventArgs e ) : void
sender object
e Windows.UI.Xaml.RoutedEventArgs
return void
        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);
        }