/// <summary> /// Gets the where spinner items. /// </summary> /// <returns>WhereSelectionItemModel collection.</returns> public ObservableCollection <WhereSelectionItemModel> GetWhereSpinnerItems() { ObservableCollection <WhereSelectionItemModel> collection = new ObservableCollection <WhereSelectionItemModel>(); foreach (var realRiderData in realRiderDataProvider.RealRiderListPageItem.WhereItemsList) { WhereSelectionItemModel model = new WhereSelectionItemModel(); model.WhereSelectedItemText = realRiderData; collection.Add(model); } return(collection); }
/// <summary> /// Load the page when app starts. /// </summary> public void PageLoad() { RealRiderListItems = new ObservableCollection <RealRiderListItemModel>(); ShowSelectedItem = new ShowSelectedItemModel(); WhereSelectedItem = new WhereSelectionItemModel(); var rrItems = realRiderMainService.GetRealRiderListItems(); foreach (var item in rrItems) { RealRiderListItems.Add(item); } ShowItems = realRiderMainService.GetShowSpinnerItems(); ShowSelectedItem.ShowSelectedItemText = ShowItems.FirstOrDefault().ShowSelectedItemText; WhereItems = realRiderMainService.GetWhereSpinnerItems(); WhereSelectedItem = WhereItems.FirstOrDefault(); }