Table of Contents

Class MoveElementsCommand

Namespace
FlowGraph.Core.Commands
Assembly
FlowGraph.Core.dll

Command to move one or more elements (nodes, shapes) to new positions. Works with any ICanvasElement that has a settable Position property.

public class MoveElementsCommand : IGraphCommand
Inheritance
MoveElementsCommand
Implements
Inherited Members

Constructors

MoveElementsCommand(Graph, ICanvasElement, Point, Point)

Creates a move command for a single element.

public MoveElementsCommand(Graph graph, ICanvasElement element, Point oldPosition, Point newPosition)

Parameters

graph Graph
element ICanvasElement
oldPosition Point
newPosition Point

MoveElementsCommand(Graph, Dictionary<string, Point>, Dictionary<string, Point>)

Creates a move command for multiple elements.

public MoveElementsCommand(Graph graph, Dictionary<string, Point> oldPositions, Dictionary<string, Point> newPositions)

Parameters

graph Graph
oldPositions Dictionary<string, Point>
newPositions Dictionary<string, Point>

Properties

Description

Gets a human-readable description of the command.

public string Description { get; }

Property Value

string

Methods

Execute()

Executes the command.

public void Execute()

Undo()

Reverses the command (undo).

public void Undo()