LEADTOOLS Windows Forms (Leadtools.WinForms assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
PageRectangle Property
See Also 
Leadtools.WinForms Namespace > RasterImagePrinter Class : PageRectangle Property



Gets or sets the rectangular area that represents the total area of the page.

Syntax

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

Property Value

A System.Drawing.Rectangle represents the total area of the page.

Example

For an example, refer to RasterImagePrinter and ImageRectangle.

Remarks

This specifies the destination rectangle on the page to where the image is to be printed. Normally, you obtain the page rectangle through the System.Drawing.Printing.PrintPageEventArgs.MarginBounds or the System.Drawing.Printing.PrintPageEventArgs object passed to your System.Drawing.Printing.PrintPageEventHandler.

You can also pass RectangleF.Empty to use the whole print area. The print area will then be calculated using the UseMargins property value and the page and margins bounds values passed through System.Drawing.Printing.PrintPageEventArgs.

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 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also