Пример #1
0
        private void Lang_change_but_Click(object sender, RoutedEventArgs e)
        {
            var lang_page = new LanguageChange(); // creating language page to navigate to it
            var back_sett = new Button()          // BUTTON'S PURPOSE: TO GO BACK OUT OF LANGUAGE CHANGE
            {
                Style = (Style)App.Current.FindResource("MaterialDesignRaisedButton")
            };

            back_sett.SetResourceReference(ContentControl.ContentProperty, "back");
            back_sett.Click += Back_sett_Click;
            lang_page.grid.Children.Add(back_sett); // adding to page's grid button
            Grid.SetRow(back_sett, 4);
            mw.Hide();
            mw.Height = lang_page.Height + 40;
            mw.Width  = lang_page.Width + 40;
            mw.Show();
            mw.Content = lang_page;
        }
Пример #2
0
        private void Next_b_Click(object sender, RoutedEventArgs e)
        {
            var page = new LanguageChange(cts);

            this.Content = page; // switching page to the next one
            InnerPages.Add(page);
            Button button = new Button()
            {
                Style = (Style)App.Current.FindResource("MaterialDesignRaisedButton"),
            };

            button.SetResourceReference(ContentControl.ContentProperty, "next");
            button.Click += Button_Click;
            page.grid.Children.Add(button);
            Grid.SetColumn(button, 2);
            Grid.SetRow(button, 4);
            this.Height = page.Height + 40;
            this.Width  = page.Width + 40;
        }