Пример #1
0
        private void resetButton_Click(object sender, RoutedEventArgs e)
        {
            CategoryCollection coll = SourceCollectionEdited as CategoryCollection;

            if (coll != null)
            {
                coll.LoadDefaults();
                for (int i = TargetCollectionEdited.Count - 1; i >= 0; i--)
                {
                    Category category = TargetCollectionEdited[i] as Category;
                    if (!coll.Contains(category))
                    {
                        TargetCollectionEdited.RemoveAt(i);
                    }
                }
            }
            UpdateCheckBoxes();
            UpdateSelectedValues();
        }