Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the diagram and verifies whether its shapes can be snapped to the grid or sets the ability to snap shapes to the grid.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property SnapToGrid As Boolean
'Usage
Dim instance As Diagram
Dim value As Boolean
value = instance.SnapToGrid
instance.SnapToGrid = value
[BrowsableAttribute(false)]
public bool SnapToGrid { get; set; }
[BrowsableAttribute(false)]
public:
property bool SnapToGrid {
bool get ();
void set (bool value);
}
public function get SnapToGrid () : boolean
public function set SnapToGrid (value : boolean)
Property Value
Type: System.Boolean
true if shapes in the diagram can be snapped to the grid; otherwise, false.
Remarks
When snap-to-grid is turned on, shapes are automatically aligned as you position or move them on the page. They are snapped to an invisible grid.
.NET Framework Security
- 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.