Class
SnapToGrid

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public class SnapToGrid

Inheritance: objectSnapToGrid

Constructors

SnapToGrid()

The default constructor sets the following default values: FieldWidth = 1.0f; SnapRelative = 0.2f; SnapDelta = 0.2f; SnapType = SnapTypes.Relative;

Declaration

cs-api-definition
public SnapToGrid()

SnapToGrid(ref SnapToGrid)

Declaration

cs-api-definition
public SnapToGrid(ref SnapToGrid e)

Parameters

e

SnapToGrid

Properties

CachedSnap

Gets the precached snap distance. Doesn't need to be equal to any of the SnapFixed or SnapRelative properties.

Declaration

cs-api-definition
public float CachedSnap { get; }

Property Value

float

FieldWidth

Width of a single box in the snap grid. It's value cannot be less than or equal to zero.

Declaration

cs-api-definition
public float FieldWidth { get; set; }

Property Value

float

SnapFixed

Sets/Gets the snap distance for fixed type snapping. Does not activate fixed type snapping. SnapType

Declaration

cs-api-definition
public float SnapFixed { get; set; }

Property Value

float

SnapRelative

Sets/Gets the relative snap distance. Does not activate relative type snapping. SnapType

Declaration

cs-api-definition
public float SnapRelative { get; set; }

Property Value

float

SnapType

Set the snap type to be one of the following: SnapTypes.Relative - snap distance is relative to the FieldWidth SnapFixed SnapTypes.Fixed - snap distance is fixed

Declaration

cs-api-definition
public SnapToGrid.SnapTypes SnapType { get; set; }

Property Value

SnapToGrid.SnapTypes

SnappedPoint

Declaration

cs-api-definition
public PointF SnappedPoint { get; }

Property Value

PointF

Methods

SnapPtToGrid(PointF)

Declaration

cs-api-definition
public int SnapPtToGrid(PointF pos)

Parameters

pos

PointF

Returns

int