Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
UseMargins Property
See Also 
Leadtools.WinForms Namespace > RasterImagePrinter Class : UseMargins Property



Gets or sets a value that indicates whether to use the page margins when printing.

Syntax

Visual Basic (Declaration) 
Public Property UseMargins As Boolean
Visual Basic (Usage)Copy Code
Dim instance As RasterImagePrinter
Dim value As Boolean
 
instance.UseMargins = value
 
value = instance.UseMargins
C# 
public bool UseMargins {get; set;}
C++/CLI 
public:
property bool UseMargins {
   bool get();
   void set (bool value);
}

Return Value

true to use the page margins when printing, otherwise; false. Default value is true.

Example

For an example, refer to RasterImagePrinter and ImageRectangle.

Remarks

When the value of the UseMargins property is set to true, the maximum page area used for printing will be the PrintPageEventArgs.MarginBounds value.

When the value of the UseMargins property is set to false, the maximum page area used for printing will be the PrintPageEventArgs.PageBounds value.

For more information on the bounds and how to change them, refer to PrintDocument, PrinterSettings and PrintPageEventArgs in MSDN.

Important: the UseMargins property is only used to calculate the printing area when the value of both PageRectangle is left to the empty default value. If you set the PageRectangle value to anything else, it is assumed that you are responsible for calculating the print area and UseMargins will be ignored.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also