Search
PrintOptions.Margins Property
See Also
 





Gets or sets the margins for the printed pages.

Namespace: MindFusion.Diagramming.WinForms
Assembly: MindFusion.Diagramming.WinForms

 Syntax

C#  Copy Code

public Margins Margins { get; set; }

Visual Basic  Copy Code

Public Property Margins As Margins

 Property Value

An instance of the .NET System.Drawing.Printing.Margins class. The default is 1-inch margins on all sides.

 Remarks

Margins are measured in hundredths of an inch. The value of this property is used by the Print override that doesn't get a PrintDocument argument. The overrides that get a PrintDocument use the margins specified in its DefaultPageSettings member.

If using page headers, make sure there is enough space left for the top margin because the headers are printed there.

 Example

C#  Copy Code

private void preview_Click(object sender, System.EventArgs e)
{
    diagramView.PrintOptions.Margins = new Margins(50, 50, 50, 50);
    diagramView.PrintPreviewEx();
}

Visual Basic  Copy Code

Private Sub preview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles preview.Click

    diagramView.PrintOptions.Margins = New Margins(50, 50, 50, 50)
    diagramView.PrintPreviewEx()

End Sub

 See Also