# SnappingConstraints class

Namespace: [Grasshopper2.UI.Canvas](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.canvas.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class SnappingConstraints
```

A collection of snapping constraints used during object dragging.

## Constructors

- [SnappingConstraints](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/ctor.md)

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/count.md)

## Methods

- [CreateFromDocument](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/createfromdocument.md): (2 overloads, static) Create a set of snapping constraints from the attributes in a document.
- [DrawSnappingBoxes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/drawsnappingboxes.md): Draw all snapping boxes to a graphics context. Handy for debugging.
- [SnapObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/snapobject.md): Snap a specific object into place, using its current bounds.
- [SnapRectangle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/snaprectangle.md): Snap a custom rectangle into place.
- [SnapWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.canvas.snappingconstraints/snapwires.md): (2 overloads, static) Snap an object into place based on horizontal wire constraints.
