private void AddUndo(UIElementUndoCommand undoCommand)
        {
            UndoableOperation <UIElementUndoCommand> operation =
                new UndoableOperation <UIElementUndoCommand>(undoCommand, this);

            _undoImplementor.AddOperation(operation);
        }
Exemple #2
0
        private void AddUndo(FrameworkElement element)
        {
            if (_undoOperationsContainer != null)
            {
                UIElementUndoCommand undoCommand = new UIElementUndoCommand(element);
                undoCommand.StateDictionary.Add("Height", element.Height);
                undoCommand.StateDictionary.Add("Width", element.Width);

                UndoableOperation <UIElementUndoCommand> operation =
                    new UndoableOperation <UIElementUndoCommand>(undoCommand, this);
                _undoOperationsContainer.AddOperation(operation);
            }
        }
        private void AddUndo(UIElement element)
        {
            if (_undoOperationsContainer != null)
            {
                UIElementUndoCommand undoCommand = new UIElementUndoCommand(element);
                undoCommand.StateDictionary.Add("Left",
                                                UIHelper.GetLeft(element, _parentPanelType));
                undoCommand.StateDictionary.Add("Top",
                                                UIHelper.GetTop(element, _parentPanelType));

                UndoableOperation <UIElementUndoCommand> operation =
                    new UndoableOperation <UIElementUndoCommand>(undoCommand, this);
                _undoOperationsContainer.AddOperation(operation);
            }
        }