ComponentOne DataGrid for WPF and Silverlight
C1.WPF.DataGrid Namespace / C1DataGrid Class / GetPageImages Method / GetPageImages(ScaleMode,Size,Thickness,Int32,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.
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.

In This Topic
    GetPageImages(ScaleMode,Size,Thickness,Int32,Int32) Method
    In This Topic
    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 Size, _
       ByVal margin As Thickness, _
       ByVal maxPages As Integer, _
       ByRef verticalPageCount As Integer _
    ) As List(Of FrameworkElement)

    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.
    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