Class DraggingOptions

GoDiagram®
v10.0.12
by Northwoods Software®

This class contains options for dragging and moving parts.

Inheritance
DraggingOptions
Namespace: Northwoods.Go
Assembly: Northwoods.GoDiagram.Avalonia.dll
Syntax
public class DraggingOptions
Remarks

This is used by MoveParts(IEnumerable<Part>, Point, bool, DraggingOptions) and ComputeMove(Part, Point, DraggingOptions).

Both the Diagram and its DraggingTool have a DraggingOptions instance. Typically, only the DraggingTool one is used, unless the Diagram has no DraggingTool defined.

In typical DraggingTool operation you do not need to create or modify a DraggingOptions instance. Setting properties on the DraggingTool such as IsGridSnapEnabled sets the value on the DragOptions instance for you.

Constructors

DraggingOptions()

Constructs a DraggingOptions.

Declaration
public DraggingOptions()
See Also

Properties

Gets or sets whether the user can move a single Link, disconnecting it from connected nodes and possibly connecting it to valid ports.

Declaration
public bool DragsLink { get; set; }
Property Value
Type Description
bool

By default this property is false.

In typical DraggingTool operation this is set via DragsLink.

DragsMembers

Determines whether dragging a Group also drags its member Parts if there is no Group.Placeholder.

Declaration
public bool DragsMembers { get; set; }
Property Value
Type Description
bool
Remarks

By default this property is true.

See Also

DragsTree

Gets or sets whether moving or copying a node also includes all of the node's tree children and their descendants, along with the links to those additional nodes.

Declaration
public bool DragsTree { get; set; }
Property Value
Type Description
bool
Remarks

By default this property is false.

In typical DraggingTool operation this is set via DragsTree.

See Also

GridSnapCellSize

Gets or sets the size of the grid cell used when snapping during a drag.

Declaration
public Size GridSnapCellSize { get; set; }
Property Value
Type Description
Size
Remarks

By default this property is the Size(double.NaN, double.NaN), which causes this tool to use the GridCellSize value of the Grid.

In typical DraggingTool operation this is set via GridSnapCellSize.

See Also

GridSnapCellSpot

Gets or sets the Spot that specifies what point in the grid cell dragged parts snap to, if the value of IsGridSnapEnabled is true.

Declaration
public Spot GridSnapCellSpot { get; set; }
Property Value
Type Description
Spot
Remarks

By default this property is TopLeft.

In typical DraggingTool operation this is set via GridSnapCellSpot.

See Also

GridSnapOrigin

Gets or sets the snapping grid's origin point, in document coordinates, if the value of IsGridSnapEnabled is true.

Declaration
public Point GridSnapOrigin { get; set; }
Property Value
Type Description
Point
Remarks

By default this property is the Point(double.NaN, double.NaN).

In typical DraggingTool operation this is set via GridSnapOrigin.

See Also

GroupsAlwaysMove

Determines whether or not Groups will ensure their member Parts always move, even if those member parts have Copyable and Movable set to false.

Declaration
public bool GroupsAlwaysMove { get; set; }
Property Value
Type Description
bool
Remarks

By default this property is true.

See Also

GroupsSnapMembers

Determines whether or not Groups will snap their member Parts in addition to themselves when moving.

Declaration
public bool GroupsSnapMembers { get; set; }
Property Value
Type Description
bool
Remarks

By default this property is false.

See Also

IsGridSnapEnabled

Whether or not the dragged parts snap to the Grid.

Declaration
public bool IsGridSnapEnabled { get; set; }
Property Value
Type Description
bool
Remarks

By default this property is false.

In typical DraggingTool operation this is set via IsGridSnapEnabled.

See Also

IsGridSnapRealtime

If dragging with the DraggingTool, whether or not Parts snap to a grid (if applicable) in real-time, or only at the end of the dragging transaction.

Declaration
public bool IsGridSnapRealtime { get; set; }
Property Value
Type Description
bool
Remarks

By default this property is true.

In typical DraggingTool operation this is set via IsGridSnapRealtime.

See Also

See Also