SnappingSettings

References
public sealed class SnappingSettings
Collects all snapping constraint settings.

Constructors

SnappingSettings

#
public SnappingSettings(SnappingRule rules, int verticalGap, int horizontalGap, int edgeRadius, int wireRadius, bool feedback, Color colour)
Create a new settings instance.
rules (SnappingRule)
verticalGap (int)
horizontalGap (int)
edgeRadius (int)
wireRadius (int)
feedback (bool)
colour (Color)

Properties

AlignBottomEdges

#
public bool AlignBottomEdges { get; }
Gets or sets whether the bottom edge of a target box is snapped to other nearby bottom edges.

AlignLeftEdges

#
public bool AlignLeftEdges { get; }
Gets or sets whether the left edge of a target box is snapped to other nearby left edges.

AlignMiddles

#
public bool AlignMiddles { get; }
Gets or sets whether the horizontal centre of a target box is snapped to other nearby horizontal centres.

AlignRightEdges

#
public bool AlignRightEdges { get; }
Gets or sets whether the right edge of a target box is snapped to other nearby right edges.

AlignTopEdges

#
public bool AlignTopEdges { get; }
Gets or sets whether the top edge of a target box is snapped to other nearby top edges.

AlignWires

#
public bool AlignWires { get; }
Gets or sets whether to straighten wires between objects.

Colour

#
public Color Colour { get; }
Gets or sets the feedback hint colour.

Current

#
public static SnappingSettings Current { get; set; }
Gets the current user snapping settings.

Default

#
public static SnappingSettings Default { get; }
Gets the factory default snapping settings.

EdgeRadius

#
public int EdgeRadius { get; }
Gets or sets the search radius for edge and gap alignment.

Feedback

#
public bool Feedback { get; }
Gets or sets whether to draw visual feedback when snapping.

HorizontalGapSize

#
public int HorizontalGapSize { get; }
Gets or sets the gap size to enforce when snapping horizontal spacing.

Rules

#
public SnappingRule Rules { get; }
Gets all the active rules.

SpaceHorizontalGaps

#
public bool SpaceHorizontalGaps { get; }
Gets or sets whether the gaps between the left and right edges of nearby boxes is snapped to a specific size.

SpaceVerticalGaps

#
public bool SpaceVerticalGaps { get; }
Gets or sets whether the gaps between the top and bottom edges of nearby boxes is snapped to a specific size.

VerticalGapSize

#
public int VerticalGapSize { get; }
Gets or sets the gap size to enforce when snapping vertical spacing.

WireRadius

#
public int WireRadius { get; }
Gets or sets the search radius for wire alignment.

Methods

SettingsControl

#
public static Control SettingsControl(SnappingSettings settings, Action<SnappingSettings> modified)
settings (SnappingSettings)
modified (Action<SnappingSettings>)

SettingsForm

#
public static Form SettingsForm(SnappingSettings settings, Action<SnappingSettings> modified)
settings (SnappingSettings)
modified (Action<SnappingSettings>)

WithFeedback

#
public SnappingSettings WithFeedback(bool drawFeedback, Color colour)
Modify these settings to have new feedback states.
drawFeedback (bool)
colour (Color)

WithoutRules

#
public SnappingSettings WithoutRules(SnappingRule rules)
Modify these settings to exclude the given rules.
rules (SnappingRule)

WithRules

#
public SnappingSettings WithRules(SnappingRule rules)
Modify these settings to include the given rules.
rules (SnappingRule)