private void RepopulateLocationsSet(IEnumerable <string> locationsSet) { ComboItems.Clear(); foreach (var location in locationsSet) { ComboItems.Add(location); } }
public MainWindow() { InitializeComponent(); ComboItems.Add(new MyItem { Name = "Stack" }); ComboItems.Add(new MyItem { Name = "Overflow" }); }
private async Task FetchLocations(string prefix) { if (prefix.Length > this.settingsProvider.Settings.MinimumSearchStringLength) { if (ComboItems.Any(x => x == prefix)) { return; } var result = await locationsDataProvider.GetLocationsListAsync(prefix.ToLower()); ComboItems.Clear(); if (result == null) { return; } foreach (var location in result) { ComboItems.Add(location.Name); } } }
public MainWindow() { InitializeComponent(); ComboItems.Add("Stack"); ComboItems.Add("Overflow"); }