Esempio n. 1
0
        public MainPageViewModel(ILoggingSystem <MainPageViewModel> logger, IEventAggregator eventAggregator)
        {
            OpenTestCommand = new RelayCommand(o => eventAggregator.Invoke(new TestEvent()
            {
                Message = $"Input: {Message}"
            }));

            OpenNewPageCommand = new RelayCommand(o => eventAggregator.Invoke(new OpenNewPageEvent()
            {
                ViewModelType = typeof(NewPageViewModel)
            }));
        }
Esempio n. 2
0
 public NewPageViewModel(IEventAggregator eventAggregator)
 {
     OpenWelcomePageCommand = new RelayCommand(o => eventAggregator.Invoke(new OpenNewPageEvent()
     {
         ViewModelType = typeof(MainPageViewModel)
     }));
 }