示例#1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            AdventDayView   dayView = new AdventDayView();
            AdventViewModel context = new AdventViewModel();

            dayView.DataContext = context;
            dayView.Show();
        }
示例#2
0
        public static DayViewModel GetDayViewModel()
        {
            AdventViewModel adventModel = App.Current.MainWindow.DataContext as AdventViewModel;

            return(adventModel.CurrentDayViewModel);
        }