Diagram.GridSize Property
Gets or sets the default grid size for the shapes on the diagram.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
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.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.