示例#1
0
 public static void Main(string[] args)
 {
     Application.Init ();
     MainWindow win = new MainWindow ();
     win.Show ();
     Application.Run ();
 }
示例#2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.Main = ((BookReader.MainWindow)(target));
         return;
     }
     this._contentLoaded = true;
 }
示例#3
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            MainWindow window = new MainWindow();

            // Create the ViewModel
            var viewModel = new MainWindowViewModel();
            window.DataContext = viewModel;

            // Save the options when window is closed
            window.Closed += ((src,ea) => viewModel.Close());

            window.Show();
        }