Class
GraphCommandBase

Base implementation of the ICommand undo redo interface.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public abstract class GraphCommandBase : ICommand

Inheritance: objectGraphCommandBase

Derived Classes: ChangeSourceCommandChangeTargetCommandGroupUndoableCommandManipulateShapeCommandMoveItemCommandUngroupUndoableCommand

Implements: ICommand

Constructors

GraphCommandBase(string)

Initializes a new instance of the GraphCommandBase class.

Declaration

cs-api-definition
protected GraphCommandBase(string name)

Parameters

name

string

The name.

GraphCommandBase(string, IDiagramItem)

Initializes a new instance of the GraphCommandBase class.

Declaration

cs-api-definition
protected GraphCommandBase(string name, IDiagramItem diagramItem)

Parameters

name

string

The name.

diagramItem

IDiagramItem

The graph item.

Properties

DiagramItem

Gets the graph item.

Declaration

cs-api-definition
public IDiagramItem DiagramItem { get; }

Property Value

IDiagramItem

Name

Gets or sets the name.

Declaration

cs-api-definition
public string Name { get; set; }

Property Value

string

The name.

Implements ICommand.Name

Methods

CanExecute(object)

Determines whether this instance can execute.

Declaration

cs-api-definition
public virtual bool CanExecute(object state)

Parameters

state

object

Returns

bool

true if this instance can execute; otherwise, false.

Implements ICommand.CanExecute(object)

Execute(object)

Executes the specified state.

Declaration

cs-api-definition
public abstract void Execute(object state = null)

Parameters

state

object

Implements ICommand.Execute(object)

Redo()

Executes and undoable action.

Declaration

cs-api-definition
public abstract void Redo()

Implements ICommand.Redo()

Undo(object)

Unwinds an undoable action.

Declaration

cs-api-definition
public abstract void Undo(object state = null)

Parameters

state

object

Implements ICommand.Undo(object)