Exemplo n.º 1
0
        public void SetAlphabetItems(List <AlphabetItemData> data)
        {
            if (Alphabets != null)
            {
                var x = Alphabets.Count - 1;
                for (int i = x; i >= 0; --i)
                {
                    var item = Alphabets[i];
                    item.PropertyChanged -= new PropertyChangedEventHandler(item_PropertyChanged);
                }
            }

            Alphabets.Clear();

            foreach (var item in data)
            {
                var tmp = new AlphabetItem(item);
                addItem(tmp);
                if (tmp.IsSelected == true)
                {
                    ActiveAlphabet = tmp;
                }
            }
        }