public void Insert(SetViewModel set)
 {
     if (activeSetIndex == sets.Count)
     {
         Add(set);
     }
     else
     {
         sets.Insert(++activeSetIndex, set);
     }
 }
        public ColorGuruViewModel(Window window)
        {
            this.window = window;

            sets          = new ObservableCollection <SetViewModel>();
            activeSet     = new SetViewModel();
            activePattern = new PatternViewModel();
            activeColor   = new ColorViewModel();

            activeSet.Insert(activePattern);
            activeSet.Insert(activePattern);
            activeSet.Insert(activePattern);
            activeSet.Insert(activePattern);
            activeSet.Insert(activePattern);
            activeSet.Insert(activePattern);

            activeSetIndex = 0;
            Insert(activeSet);
        }
 public void NewSet()
 {
     activeSet = new SetViewModel();
     Insert(activeSet);
 }
 private void Add(SetViewModel set)
 {
     sets.Add(set);
     activeSetIndex++;
 }