public void OnNavigatingTo(INavigationParameters parameters) { var selectedTab = parameters?.GetValue <string>(KnownNavigationParameters.SelectedTab); foreach (var child in Children) { var element = child; if (element is NavigationPage navigationPage) { //if the child page is a navigation page get its root page element = navigationPage.RootPage; } (element as INavigatingAware)?.OnNavigatingTo(parameters); (element?.BindingContext as ViewModelBase)?.OnNavigatingTo(parameters); if (!string.IsNullOrWhiteSpace(selectedTab)) { if (element.GetType() == PageNavigationRegistry.GetPageType(selectedTab)) { this.CurrentPage = child; } } } }
private static void TabbedPageSelectTab(TabbedPage tabbedPage, INavigationParameters parameters) { var selectedTab = parameters?.GetValue <string>(KnownNavigationParameters.SelectedTab); if (!string.IsNullOrWhiteSpace(selectedTab)) { var selectedTabType = PageNavigationRegistry.GetPageType(UriParsingHelper.GetSegmentName(selectedTab)); var childFound = false; foreach (var child in tabbedPage.Children) { if (!childFound && child.GetType() == selectedTabType) { tabbedPage.CurrentPage = child; childFound = true; } if (child is NavigationPage) { if (!childFound && ((NavigationPage)child).CurrentPage.GetType() == selectedTabType) { tabbedPage.CurrentPage = child; childFound = true; } } } } }
public override void OnNavigatingTo(INavigationParameters parameters) { if (parameters.ContainsKey("model")) { List <BarcodeModel> value = parameters.GetValue <List <BarcodeModel> >("model"); LoadBarcodeValue(value); } }
public override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); CalendarItem calendarItem = parameters.GetValue <CalendarItem>("details"); LeaveDetails = calendarItem.Leaves; }
public override void OnNavigatedTo(INavigationParameters parameters) { var id = parameters.GetValue <string>($"ID"); MovieID = Convert.ToInt32(id); Movie = new Movie(); LoadMovie(); }
public void OnNavigatedTo(INavigationParameters parameters) { if (parameters.TryGetValue <UserModel>(ListOfNames.newUser, out UserModel userModel)) { UserModel = parameters.GetValue <UserModel>(ListOfNames.newUser); Login = UserModel.Login; } }
public async override void OnNavigatedTo(INavigationParameters parameters) { ParameterTopic = parameters.GetValue <string>("Category"); if (ParameterTopic != null) { await GetSpecifiedNews(ParameterTopic); } }
public void OnNavigatedTo(INavigationParameters parameters) { if (parameters.GetNavigationMode() == NavigationMode.New) { MyTaskRepository repository = new MyTaskRepository(); var tasks = repository.GetMyTask(); foreach (var item in tasks) { MyTaskItemList.Add(item); } } else { if (parameters.ContainsKey("Mode")) { var Mode = parameters.GetValue <string>("Mode"); MyTaskItem item = parameters .GetValue <MyTaskItem>("MyTaskSelectedItem"); if (Mode == "修改") { MyTaskItem UpdateRecore = MyTaskItemList .FirstOrDefault(x => x.MyTaskName == item.MyTaskName); if (UpdateRecore != null) { UpdateRecore.MyTaskDate = item.MyTaskDate; UpdateRecore.MyTaskStatus = item.MyTaskStatus; } } if (Mode == "刪除") { MyTaskItem DeleteRecore = MyTaskItemList .FirstOrDefault(x => x.MyTaskName == item.MyTaskName); if (DeleteRecore != null) { MyTaskItemList.Remove(DeleteRecore); } } if (Mode == "新增") { MyTaskItemList.Insert(0, item); } } } }
public override void OnNavigatingTo(INavigationParameters parameters) { base.OnNavigatingTo(parameters); string receivedJsonObject = parameters.GetValue <string>(key: AppConstants.ObjectDetail); ReceivedItem = JsonConvert.DeserializeObject <Result>(receivedJsonObject); UpdateUserInfo(); }
public override void OnNavigatingTo(INavigationParameters parameters) { base.OnNavigatingTo(parameters); if (parameters.ContainsKey("userId")) { userId = parameters.GetValue <string>("userId"); } }
public override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); _tournament = parameters.GetValue <TournamentResponse>("tournament"); Title = _tournament.Name; }
public void OnNavigatingTo(INavigationParameters parameters) { Directory = (string)parameters[NavigationParameterNames.Directory]; if (parameters.ContainsKey(NavigationParameterNames.GoBack)) { backToTrimmer = parameters.GetValue <bool>(NavigationParameterNames.GoBack); } }
public override void Initialize(INavigationParameters parameters) { if (parameters.ContainsKey("Game")) { Game = parameters.GetValue <Games>("Game"); } ChboX = false; }
public void OnNavigatedTo(INavigationParameters parameters) { WriteLine($"{Title} OnNavigatedTo"); Message = parameters.GetValue <string>("message"); WriteLine($"Parameters: {Message}"); WriteLine($"Can Navigate: {NavigateCommand.CanExecute("foobar")}"); WriteLine($"NavigationService Page: {(_navigationService as IPageAware).Page.GetType().Name}"); }
public override void OnNavigatingTo(INavigationParameters parameters) { if (parameters.ContainsKey("ManifestId")) { var Manifestd = parameters.GetValue <string>("ManifestId"); } CheckDraftmaniFestsAsync(); }
public void OnNavigatingTo(INavigationParameters parameters) { if (parameters.ContainsKey("profissional")) { Profissional = parameters.GetValue <Profissional>("profissional"); Comentarios = ComentarioRepositorio.ObterComentarios(Profissional); } }
public override void OnNavigatedTo(INavigationParameters parameters) { this.ForMonitoring = parameters.GetValue <bool>("Monitoring"); this.Title = this.ForMonitoring ? "Create Monitoring Region" : "Create Ranging Region"; var current = parameters.GetValue <BeaconRegion>(nameof(BeaconRegion)); if (current != null) { this.Identifier = current.Identifier; this.Uuid = current.Uuid.ToString(); this.Major = current.Major?.ToString() ?? String.Empty; this.Minor = current.Minor?.ToString() ?? String.Empty; } }
public override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); if (parameters.ContainsKey("pageReturn")) { _pageReturn = parameters.GetValue <string>("pageReturn"); } }
} //CheckInOut object beign updated public void OnNavigatedTo(INavigationParameters navigationParameters) { CheckInOut = navigationParameters.GetValue <CheckInOut>("object"); if (CheckInOut != null) { From = CheckInOut.StartTime; To = CheckInOut.EndTime; } }
public override void OnNavigatingTo(INavigationParameters parameters) { var newRegion = parameters.GetValue <BeaconRegion>(nameof(BeaconRegion)); if (newRegion != null) { this.beaconManager.StartMonitoring(newRegion); } }
public override Task InitializeVMAsync(INavigationParameters parameters) { if (parameters == null || !parameters.ContainsKey(ITEM_KEY)) { return(Task.CompletedTask); } Item = parameters.GetValue <LibraryItem>(ITEM_KEY); return(Task.CompletedTask); }
public override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); if (parameters.ContainsKey("tournament")) { _tournament = parameters.GetValue <TournamentResponse>("tournament"); Title = $"{_tournament.Name}"; } }
public override Task InitializeVMAsync(INavigationParameters parameters) { if (parameters == null || !parameters.ContainsKey(USER_HOLDS_KEY)) { return(Task.CompletedTask); } UserHolds = parameters.GetValue <UserHolds>(USER_HOLDS_KEY); return(Task.CompletedTask); }
public async override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); SelectedResult = parameters.GetValue <AppUsersDTO>("SelectedAppUser") ?? new AppUsersDTO(); IsBusy = true; await GetAppRoles(); IsBusy = false; }
public override void Initialize(INavigationParameters parameters) { base.Initialize(parameters); QuantityInCart = parameters.GetValue <int>("QuantityInCart"); OrderedQuantity = QuantityInCart == 0 ? 1 : QuantityInCart; AddToCartText = QuantityInCart == 0 ? ADD_TO_CART : UPDATE_CART; }
public void OnNavigatedTo(INavigationParameters parameters) { LeagueDetails = parameters.GetValue <Datum>(ParameterConstants.League); Name = LeagueDetails.Name; Logo = LeagueDetails.Logo; Country = LeagueDetails.Host.Country; Division = LeagueDetails.Facts[0].Value; Rounds = LeagueDetails.Facts[1].Value; }
public override void OnNavigatedTo(INavigationParameters parameters) { this.region = parameters.GetValue <BeaconRegion>(nameof(BeaconRegion)); if (this.region != null) { this.scanner.Start(this.region, RxApp.MainThreadScheduler); this.IsBusy = true; } }
public override Task InitializeVMAsync(INavigationParameters parameters) { if (parameters == null || !parameters.ContainsKey(CHECKEDOUT_KEY)) { return(Task.CompletedTask); } CheckedOutItem = parameters.GetValue <CheckedOutItem>(CHECKEDOUT_KEY); return(Task.CompletedTask); }
public override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); if (parameters.ContainsKey("product")) { ProductResponse product = parameters.GetValue <ProductResponse>("product"); Title = product.Name; } }
public override void OnNavigatedTo(INavigationParameters param) { if (!param.ContainsKey("theProduct")) { return; } Product = param.GetValue <ProductViewModel>("theProduct"); }