Esempio n. 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            Window mainWindow = null;

            // check some state or setting as appropriate
            if (ConfigurationManager.AppSettings["AdvancedMode"] == "1")
            {
                mainWindow = new OtherWindow();
            }
            else
            {
                mainWindow = new MainWindow();
            }
            mainWindow.Show();
        }
Esempio n. 2
0
        void OnOpenOtherWindow(object sender, RoutedEventArgs e)
        {
            var other = new OtherWindow();

            other.Show();
        }