Diagram::SnapToGrid Property
Visual Studio 2015
If true, shapes on the diagram are adjusted to align with a grid when they are moved by the user. Default value is true.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
public: [BrowsableAttribute(false)] property bool SnapToGrid { bool get(); void set(bool value); }
Property Value
Type: System::BooleanWhen snap-to-grid is turned on, shapes are automatically aligned as the user move them on the diagram. The X and Y values of the positions are set to multiples of their GridSize.
If you do not want any shapes in your diagram to be aligned to a grid, override this property to return false. If you want alignment only for some shapes, leave this property true, and override the GridSize to return 0.0 for those ShapeElements that you want to be unaligned.
Show: