Exemple #1
0
 private void Pop()
 {
     Debug.Assert(_stack.Count > 1, "We never pop the root page.");
     _stack.RemoveAt(_stack.Count - 1);
     NotifyOfPropertyChange("Previous");
     if (_stack.Count == 1)
     {
         GoBackCmd.RaiseCanExecuteChanged(_goBackCommand);
     }
 }
Exemple #2
0
 private void Push(T item)
 {
     Debug.Assert(_stack.Count == 0 || _stack[_stack.Count - 1] != item);
     _stack.Add(item);
     NotifyOfPropertyChange("Previous");
     if (_stack.Count == 2)
     {
         GoBackCmd.RaiseCanExecuteChanged(_goBackCommand);
     }
 }