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

Base implementation of the ICommand undo redo interface.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public abstract class GraphCommandBase : ICommand

Inheritance: objectGraphCommandBase

Derived Classes: ChangeSourceCommandChangeTargetCommandGroupUndoableCommandManipulateShapeCommandMoveItemCommandUngroupUndoableCommand...

Implements: ICommand

Constructors

Initializes a new instance of the GraphCommandBase class.

C#
protected GraphCommandBase(string name, IDiagramItem diagramItem)
Parameters:namestring

The name.

diagramItemIDiagramItem

The graph item.

Initializes a new instance of the GraphCommandBase class.

C#
protected GraphCommandBase(string name)
Parameters:namestring

The name.

Properties

Gets the graph item.

C#
public IDiagramItem DiagramItem { get; }

Gets or sets the name.

C#
public string Name { get; set; }
Property Value:

The name.

Implements: ICommand.Name

Methods

Determines whether this instance can execute.

C#
public virtual bool CanExecute(object state)
Parameters:stateobjectReturns:

bool

true if this instance can execute; otherwise, false.

Implements: ICommand.CanExecute(object)

Executes the specified state.

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

Implements: ICommand.Execute(object)

Executes and undoable action.

C#
public abstract void Redo()

Implements: ICommand.Redo()

Unwinds an undoable action.

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

Implements: ICommand.Undo(object)