private async void MyListView_OnRefreshing(object sender, EventArgs e) { await Task.Run(() => { ListaItens.Insert(0, new Model { Conteudo = "Novo elemento" }); }); MyListView.EndRefresh(); }
private void UpdateList(string txtvalue) { MyListView.BeginRefresh(); if (string.IsNullOrWhiteSpace(txtvalue)) { MyListView.ItemsSource = _viewmodel.PlotListFull; } else { MyListView.ItemsSource = _viewmodel.PlotListFull.Where(i => i.VSNPLOTNAME.Contains(txtvalue)); } MyListView.EndRefresh(); }
private async void DisappearPopup() { PopupRegister.IsEnabled = false; PopupRegister.IsVisible = false; WaitingStack.IsVisible = true; MyListView.BeginRefresh(); await LoginToGame(); ContactsTab.IsVisible = true; MyListView.EndRefresh(); WaitingStack.IsVisible = false; MainPageLayout.BackgroundColor = Color.Default; MyListView.IsVisible = true; }
private void UpdateList(string txtvalue = null) { MyListView.BeginRefresh(); if (string.IsNullOrWhiteSpace(txtvalue)) { MyListView.ItemsSource = _viewmodel.TreeStemListFull; } else { MyListView.ItemsSource = _viewmodel.TreeStemListFull.Where(i => i.TREENUMBER.Equals(Int32.Parse(txtvalue))); } MyListView.EndRefresh(); }
private void SearchBar_OnTextChanged(object sender, TextChangedEventArgs e) { MyListView.BeginRefresh(); if (string.IsNullOrWhiteSpace(e.NewTextValue)) { MyListView.ItemsSource = _viewmodel.PlotListFull; } else { MyListView.ItemsSource = _viewmodel.PlotListFull.Where(i => i.PLOTNUM.Contains(e.NewTextValue)); } MyListView.EndRefresh(); }
private void SearchBar_OnTextChanged(object sender, TextChangedEventArgs e) { MyListView.BeginRefresh(); if (string.IsNullOrWhiteSpace(e.NewTextValue)) { MyListView.ItemsSource = _viewmodel.PersonList; } else { MyListView.ItemsSource = _viewmodel.PersonList.Where(i => i.LASTNAME.ToUpper().Contains(e.NewTextValue.ToUpper())); } MyListView.EndRefresh(); }
private void SearchBar_OnTextChanged(object sender, TextChangedEventArgs e) { MyListView.BeginRefresh(); if (string.IsNullOrWhiteSpace(e.NewTextValue)) { MyListView.ItemsSource = _viewmodel.TreeStemListFull; } else { MyListView.ItemsSource = _viewmodel.TreeStemListFull.Where(i => i.TREENUM.Equals(Int32.Parse(e.NewTextValue))); } MyListView.EndRefresh(); }
// SearchBar_OnTextChanged - responds to SearchBar in MainPage.xaml private void SearchBar_OnTextChanged(object sender, TextChangedEventArgs e) { // Starts refresh of MyListView MyListView.BeginRefresh(); // if the search field is empty, an alert is displayed to the user telling them to type something if (string.IsNullOrWhiteSpace(e.NewTextValue)) { DisplayAlert("Error", "Please type a title to search for", "OK"); } // otherwise, the word they have searched for is searched against the MyListView.ItemsSource // User's search must be an exact match to the item, i.e., 'The Lord of the Rings' will not find 'Lord of the Rings' else { MyListView.ItemsSource = movieItems.Where(i => i.Contains(e.NewTextValue)); } // Ends refresh of MyListView MyListView.EndRefresh(); }
/// <summary> /// Called to refresh the events listview /// </summary> /// <param name="sender">object</param> /// <param name="e">EventArgs</param> protected void RefreshEventsList(object sender, EventArgs e) { if (CrossConnectivity.Current.IsConnected) { Task.Run(() => { List <int> Events_id = new List <int>(); Events_id = JsonParser.GetEventsIdToDownload(LoggedUser); LoggedUser.Events_id = Events_id; //Download and Deserialize json events Events = JsonParser.DeserializeJson(LoggedUser); Device.BeginInvokeOnMainThread(() => { Items = new ObservableCollection <Event>(Events.OrderBy(x => x.Name)); MyListView.ItemsSource = Items; }); }); } MyListView.EndRefresh(); }
private void Apiclicked(object sender, EventArgs args) { GetData(); MyListView.EndRefresh(); }
private void ListView_OnRefreshing(object sender, EventArgs e) { MyListView.ItemsSource = GetList(); MyListView.EndRefresh(); }
public DataPage() { InitializeComponent(); // Garnisage des valeurs selon la présence de propriétées sauvegardée if (Application.Current.Properties.ContainsKey(KEY_TRI)) { tri = (E_TRI)Application.Current.Properties[KEY_TRI]; triButton.Source = GetImageSourceFromSort(tri); } if (Application.Current.Properties.ContainsKey(KEY_TTN_APP_ACCES_KEY)) { ttnAppAccesKey = (string)Application.Current.Properties[KEY_TTN_APP_ACCES_KEY]; } if (Application.Current.Properties.ContainsKey(KEY_SWAGGER_QUERY_BASE)) { swagger_Query_Base = (string)Application.Current.Properties[KEY_SWAGGER_QUERY_BASE]; } if (Application.Current.Properties.ContainsKey(KEY_SWAGGER_QUERY_TIME)) { swagger_Query_Time = (string)Application.Current.Properties[KEY_SWAGGER_QUERY_TIME]; } if (Application.Current.Properties.ContainsKey(KEY_OK_VALUE)) { okValue = (String)Application.Current.Properties[KEY_OK_VALUE]; } if (Application.Current.Properties.ContainsKey(KEY_DANGER_VALUE)) { dangerValue = (String)Application.Current.Properties[KEY_DANGER_VALUE]; } MyListView.IsVisible = false; waitLayout.IsVisible = true; MyListView.RefreshCommand = new Command((obj) => { TelechargementData((data) => { SetHumidityDataImages(); MyListView.ItemsSource = GetHumidityDataFromSort(tri, humidityData); MyListView.EndRefresh(); }); }); TelechargementData((data) => { SetHumidityDataImages(); MyListView.ItemsSource = GetHumidityDataFromSort(tri, humidityData); MyListView.IsVisible = true; waitLayout.IsVisible = false; }); // Création d'une vue d'alerte à la selection d'un item, on affiche ses détails. MyListView.ItemSelected += (sender, e) => { if (e.SelectedItem == null) { return; } HumidityData item = MyListView.SelectedItem as HumidityData; DisplayAlert("Détails du relevé", "Device ID : " + item.Device_id + "\nValeur : " + item.PayloadBE + "%" + "\nMoment du relevé : " + item.LocalTime.ToString() + "\nInterval de temps avec le relevé : " + item.PayloadTimeSpan, "OK"); MyListView.SelectedItem = null; }; }
internal void StopRefresh() { MyListView.EndRefresh(); }