Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

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

            dayView.DataContext = context;
            dayView.Show();
        }
Ejemplo n.º 2
0
        public static DayViewModel GetDayViewModel()
        {
            AdventViewModel adventModel = App.Current.MainWindow.DataContext as AdventViewModel;

            return(adventModel.CurrentDayViewModel);
        }