ComponentOne DataGrid for WPF and Silverlight
GetPageImages(ScaleMode,Size,Thickness,Int32,Boolean,Int32) Method

C1.WPF.DataGrid Namespace > C1DataGrid Class > GetPageImages Method : GetPageImages(ScaleMode,Size,Thickness,Int32,Boolean,Int32) Method
How to scale the document to fit the pages.
Size of the pages in pixels.
Margin around the page in pixels.
The maximum number of pages to print.
Indicates whether page info like a page number/count should be added to the generated images.
Returns the number of vertical pages. Note that if C1DataGrid width doesn't fit to the specified page width, each vertical page is additionally split horizontally to subpages that fit to the specified width, so one vertical page is represented by multiple items in the collection returned by this method. This out parameter returns the number of vertical pages, that doesn't take into account horizontal splits. The number of horizontal subpages for each vertical page can be calculated by dividing the number of items returned by this method by the value returned in the verticalPageCount parameter.
Gets a list of elements that represent parts of the grid fit for rendering into pages of a document.
Syntax
'Declaration
 
Public Overloads Function GetPageImages( _
   ByVal scaleMode As ScaleMode, _
   ByVal pageSize As System.Windows.Size, _
   ByVal margin As System.Windows.Thickness, _
   ByVal maxPages As System.Integer, _
   ByVal showPageInfo As System.Boolean, _
   ByRef verticalPageCount As System.Integer _
) As System.Collections.Generic.List(Of FrameworkElement)
public System.Collections.Generic.List<FrameworkElement> GetPageImages( 
   ScaleMode scaleMode,
   System.Windows.Size pageSize,
   System.Windows.Thickness margin,
   System.int maxPages,
   System.bool showPageInfo,
   out System.int verticalPageCount
)

Parameters

scaleMode
How to scale the document to fit the pages.
pageSize
Size of the pages in pixels.
margin
Margin around the page in pixels.
maxPages
The maximum number of pages to print.
showPageInfo
Indicates whether page info like a page number/count should be added to the generated images.
verticalPageCount
Returns the number of vertical pages. Note that if C1DataGrid width doesn't fit to the specified page width, each vertical page is additionally split horizontally to subpages that fit to the specified width, so one vertical page is represented by multiple items in the collection returned by this method. This out parameter returns the number of vertical pages, that doesn't take into account horizontal splits. The number of horizontal subpages for each vertical page can be calculated by dividing the number of items returned by this method by the value returned in the verticalPageCount parameter.

Return Value

A list with elements that correspond to the pages.
See Also

Reference

C1DataGrid Class
C1DataGrid Members
Overload List