public HubView() { InitializeComponent(); ViewLocator.Default = new HubViewLocator(); HubViewModel.Navigator = NavService; Loaded += (s, e) => HubViewModel.Initialize(null); }
public static Cats.Models.Hub BindHub(HubViewModel hubViewModel) { return(new Cats.Models.Hub() { HubID = hubViewModel.HubID, Name = hubViewModel.HubName, HubOwnerID = hubViewModel.HubOwnerID }); }
public HubView() { InitializeComponent(); ViewLocator.Default = new HubViewLocator(); Vm.Navigator = NavService; var vm = new HubViewModel { Navigator = NavService }; DataContext = vm; }
public ActionResult Hub_Create([DataSourceRequest] DataSourceRequest request, HubViewModel hubViewModel) { var hub = new Hub(); if (hubViewModel != null && ModelState.IsValid) { hub = HubViewModelBinder.BindHub(hubViewModel); _hubService.AddHub(hub); } return(Json(new[] { hub }.ToDataSourceResult(request, ModelState))); }
public HubPage() { InitializeComponent(); BindingContext = _viewModel = App.Current.Services.GetService <HubViewModel>(); }