/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IDataService dataService) { _dataService = dataService; _dataService.GetData( (item, error) => { if (error != null) { // Report error here return; } WelcomeTitle = item.Title; }); _dataService.GetDefaultMailMessage( (item, error) => { if (error != null) { // Report error here return; } MainMailMessage = item; }); SendMainCommand = new RelayCommand(OnSendMail); AboutMeCommand = new RelayCommand(OnAboutMe); }