GetDefaultPageSize() public static method

public static GetDefaultPageSize ( RectangleF printAreaRectangle, float printScaleRatio, int &pageWidth, int &pageHeight, int &pageMargin, bool &landscape ) : void
printAreaRectangle System.Drawing.RectangleF
printScaleRatio float
pageWidth int
pageHeight int
pageMargin int
landscape bool
return void
Example #1
0
        void NewEventPaperSize_Load(object sender, EventArgs e)
        {
            containingWizard = (NewEventWizard)Parent;

            RectangleF printArea       = containingWizard.mapBounds;
            float      printScaleRatio = containingWizard.DefaultPrintScale / containingWizard.MapScale;

            // Set the default page setting from the map size and print scale.
            int  pageWidth, pageHeight, pageMargin;
            bool landscape;

            MapUtil.GetDefaultPageSize(printArea, printScaleRatio, out pageWidth, out pageHeight, out pageMargin, out landscape);
            paperSizeControl.PaperSize  = new System.Drawing.Printing.PaperSize("", pageWidth, pageHeight);
            paperSizeControl.MarginSize = pageMargin;
            paperSizeControl.Landscape  = landscape;
        }