The following code adds a horizontal and a vertical guideline to a drawing document:
C# |
Copy Code
|
---|---|
// create a horizontal guideline with Y coordinate 20 (in scene units) NHorizontalGuideline hguide = new NHorizontalGuideline(20); drawingDocument.Guidelines.AddChild(hguide); // create a vertical guideline with X coordinate 30 (in scene units) NVerticalGuideline vguide = new NVerticalGuideline(20); drawingDocument.Guidelines.AddChild(vguide); |
Visual Basic |
Copy Code
|
---|---|
' create a horizontal guideline with Y coordinate 20 (in scene units) Dim hguide As New NHorizontalGuideline(20) drawingDocument.Guidelines.AddChild(hguide) ' create a vertical guideline with X coordinate 30 (in scene units) Dim vguide As New NVerticalGuideline(20) drawingDocument.Guidelines.AddChild(vguide) |