Diagram::GridSize Property
Visual Studio 2015
Gets or sets the default grid size for the shapes on the diagram.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
public: property double GridSize { virtual double get() override; virtual void set(double value) override; }
When a shape is moved by the user, it snaps to a grid – that is, its position is adjusted so that the X and Y coordinates are multiples of the grid size. For each shape, the relevant grid size is specified by its own GridSize property, and the default value is the GridSize of the parent. The grid size of a diagram determines the default GridSize for its children.
Set this value to change the grid size for the diagram and the default for its child shapes.
If you want to change the default grid size for all instances of a diagram type, override DefaultGridSize.
To switch off grid adjustment, set the GridSize to 0.0.
Show: