示例#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();
        }
示例#2
0
        void OnOpenOtherWindow(object sender, RoutedEventArgs e)
        {
            var other = new OtherWindow();

            other.Show();
        }