protected void ClearCommandExecute() { CompleteTextEditing(true); while (canvas.Children.Count > 2) { canvas.Children.RemoveAt(2); } URStack.Clear(); RaiseCommandsCanExecuteChanged(); SetCurrentValue(BackgroundImageSourceProperty, null); }
protected void RedoCommandExecute() { canvas.Children.Add(URStack.Pop()); RaiseCommandsCanExecuteChanged(); }
protected void UndoCommandExecute() { URStack.Push(canvas.Children[canvas.Children.Count - 1] as UIElement); canvas.Children.RemoveAt(canvas.Children.Count - 1); RaiseCommandsCanExecuteChanged(); }