private void button_Click_1(object sender, RoutedEventArgs e)
 {
     Grid mainMenu = (Grid)Parent;
     mainMenu.Children.Clear();
     mainMenu_Control showMainMenu = new mainMenu_Control();
     mainMenu.Children.Add(showMainMenu);
 }
 private void backToMainMenu_Click(object sender, RoutedEventArgs e)
 {
     Grid mainMenu = (Grid)Parent;
     mainMenu.Children.Clear();
     window.BackgroundMusic_Control.changeMuteButtonWhite();
     mainMenu_Control showMainMenu = new mainMenu_Control();
     mainMenu.Children.Add(showMainMenu);
 }
        public MainWindow()
        {
            InitializeComponent();
            mainMenu_Control showMainMenu = new mainMenu_Control();
            mainMenu.Children.Add(showMainMenu);

            // load backgroundMusic_controller with white button
            BackgroundMusic_Control = new BackgroundMusic();
            mainGrid.Children.Add(BackgroundMusic_Control);
        }
        private void backToMainMenu_click(object sender, RoutedEventArgs e)
        {
            // resize to normal window size
            window.Height = 450;
            window.Width = 450;

            // change mutebutton margin
            window.BackgroundMusic_Control.Margin = new Thickness(0, 0, 0, 0);

            // change button back to white
            window.BackgroundMusic_Control.changeMuteButtonWhite();

            // load mainMenu_Control
            Grid mainMenu = (Grid)Parent;
            mainMenu.Children.Clear();
            mainMenu_Control showMainMenu = new mainMenu_Control();
            mainMenu.Children.Add(showMainMenu);
        }
 public MainWindow()
 {
     InitializeComponent();
     mainMenu_Control showMainMenu = new mainMenu_Control();
     mainMenu.Children.Add(showMainMenu);
 }