Пример #1
0
        private static void CountriesList_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
            case NotifyCollectionChangedAction.Add:
                if (e.NewItems != null)
                {
                    _countriesInformationList.AddRange(e.NewItems.Cast <string>().Select(x => new SelectCountry(x)));
                    return;
                }
                break;

            case NotifyCollectionChangedAction.Move:
                return;
            }

            _countriesInformationList.ReplaceEverythingBy(
                SuggestionLists.CountriesList.Select(x => new SelectCountry(x))
                );
        }