New to Telerik UI for WinFormsStart a free 30-day trial

Undoable move action.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public class MoveItemCommand : GraphCommandBase, ICommand

Inheritance: objectGraphCommandBaseMoveItemCommand

Implements: ICommand

Inherited Members GraphCommandBase.CanExecute(object)GraphCommandBase.NameGraphCommandBase.DiagramItem

Constructors

Initializes a new instance of the MoveItemCommand class.

C#
public MoveItemCommand(string name, IDiagramItem shape, Point oldLocation, Point newLocation)
Parameters:namestring

The name.

shapeIDiagramItem

The shape.

oldLocationPoint

The old location.

newLocationPoint

The new location.

Methods

Executes the specified state.

C#
public override void Execute(object state = null)
Parameters:stateobject

Overrides: GraphCommandBase.Execute(object)

Redoes this instance.

C#
public override void Redo()

Overrides: GraphCommandBase.Redo()

Undoes this instance.

C#
public override void Undo(object state = null)
Parameters:stateobject

Overrides: GraphCommandBase.Undo(object)