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.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Overridable ReadOnly Property DefaultGridSize As Double
[BrowsableAttribute(false)]
public virtual double DefaultGridSize { get; }
[BrowsableAttribute(false)]
public:
virtual property double DefaultGridSize {
    double get ();
}
[<BrowsableAttribute(false)>]
abstract DefaultGridSize : float with get
[<BrowsableAttribute(false)>]
override DefaultGridSize : float with get
function get DefaultGridSize () : double

Property Value

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

Remarks

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.

Examples

public override double DefaultGridSize
{
    get
    {
        return 0.01;
    }
}

.NET Framework Security

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace

GridSize