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

Base class for undoable actions based on delegates.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public class DrawCommand : UndoableDelegateCommand, ICommand

Inheritance: objectUndoableDelegateCommandDrawCommand

Implements: ICommand

Inherited Members UndoableDelegateCommand.Undo(object)UndoableDelegateCommand.Redo()UndoableDelegateCommand.Execute(object)UndoableDelegateCommand.CanExecute(object)UndoableDelegateCommand.Name

Constructors

Initializes a new instance of the DrawCommand class.

C#
public DrawCommand(string name, IGeometryShape shape, bool isComplete, DrawingState oldState, DrawingState newState, Action<object> execute, Action<object> undo = null, Predicate<object> canExecute = null)
Parameters:namestring

The name.

shapeIGeometryShape

The shape.

isCompletebool

If set to true [is complete].

oldStateDrawingState

The old state.

newStateDrawingState

The new state.

executeAction<object>

The execute.

undoAction<object>

The undo.

canExecutePredicate<object>

The can execute.

Properties

Gets a value indicating whether this instance is complete.

C#
public bool IsComplete { get; }

Gets the new state.

C#
public DrawingState NewState { get; }

Gets the old state.

C#
public DrawingState OldState { get; }

Gets the shape.

C#
public IGeometryShape Shape { get; }