コード例 #1
0
        public void ApplicationStartup(object sender, StartupEventArgs e)
        {
            var mainWindowVm = new MainWindowVm();
            var mainWindow   = new MainWindow(mainWindowVm);

            mainWindow.Show();
        }
コード例 #2
0
        public MainWindow(MainWindowVm mainWindowVm)
        {
            this.mainWindowVm = mainWindowVm;

            DataContext = mainWindowVm;
            Closing    += (sender, e) => { Dispose(); };
            InitializeComponent();
        }