示例#1
0
 private void RepopulateLocationsSet(IEnumerable <string> locationsSet)
 {
     ComboItems.Clear();
     foreach (var location in locationsSet)
     {
         ComboItems.Add(location);
     }
 }
示例#2
0
 public MainWindow()
 {
     InitializeComponent();
     ComboItems.Add(new MyItem {
         Name = "Stack"
     });
     ComboItems.Add(new MyItem {
         Name = "Overflow"
     });
 }
示例#3
0
        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");
 }