This topic has not yet been rated - Rate this topic

Diagram.DefaultGridSize Property

Gets the size of the grid for the diagram. When the user moves a shape, its position is adjusted to align with the grid.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
[BrowsableAttribute(false)]
public virtual double DefaultGridSize { get; }

Property Value

Type: System.Double
The size of the grid for the diagram.

Override this property to change the default grid size for the diagram and its shapes.

If you do not want shapes to snap to a grid, set SnapToGrid false, or override it.

public override double DefaultGridSize
{
    get
    {
        return 0.01;
    }
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ