Inheritance: ViewModelBase
Beispiel #1
0
        protected void FetchInitialUserData(Action successCallback, Action <ServiceException> failureCallback)
        {
            var call = App.BuildService(new FetchMeService());

            call.AddFailureHandler(failureCallback);
            call.Execute(service =>
            {
                CurrentUser = service.Result;
                Courses     = new CoursesViewModel();
                Courses.Load(successCallback);
            });
        }
 protected void FetchInitialUserData(Action successCallback,Action<ServiceException> failureCallback)
 {
     var call = App.BuildService(new FetchMeService());
     call.AddFailureHandler(failureCallback);
     call.Execute(service =>
     {
         CurrentUser = service.Result;
         Courses = new CoursesViewModel();
         Courses.Load(successCallback);
     });
 }
 protected override void OnReady(System.Windows.Navigation.NavigationEventArgs e)
 {
     var cvm = new CoursesViewModel();
     this.DataContext = cvm;
     cvm.Load();
 }