menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DataGridPrintTaskRequestedEventArgs - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DataGridPrintTaskRequestedEventArgs

    Provides data for PrintTaskRequested event.

    Inheritance
    System.Object
    GridEventArgs
    DataGridPrintTaskRequestedEventArgs
    Inherited Members
    GridEventArgs.OriginalSender
    Namespace: Syncfusion.UI.Xaml.Grid
    Assembly: Syncfusion.SfGrid.UWP.dll
    Syntax
    public class DataGridPrintTaskRequestedEventArgs : GridEventArgs

    Constructors

    DataGridPrintTaskRequestedEventArgs(Object, PrintTaskRequest, IPrintDocumentSource)

    Initializes a new instance of DataGridPrintTaskRequestedEventArgs class.

    Declaration
    public DataGridPrintTaskRequestedEventArgs(object originalSource, PrintTaskRequest request, IPrintDocumentSource printDocumentSource)
    Parameters
    Type Name Description
    System.Object originalSource

    The source of the event.

    Windows.Graphics.Printing.PrintTaskRequest request

    The object for a print task.

    Windows.Graphics.Printing.IPrintDocumentSource printDocumentSource

    The source of the print document.

    Properties

    PrintDocumentSource

    Gets a document source reference for the of SfDataGrid.

    Declaration
    public IPrintDocumentSource PrintDocumentSource { get; }
    Property Value
    Type
    Windows.Graphics.Printing.IPrintDocumentSource

    PrintTask

    Gets or sets the Windows.Graphics.Printing.PrintTask that represents the printing operation including the content to be printed.

    Declaration
    public PrintTask PrintTask { get; set; }
    Property Value
    Type
    Windows.Graphics.Printing.PrintTask

    Request

    Gets the Windows.Graphics.Printing.PrintTaskRequest object for a print task.

    Declaration
    public PrintTaskRequest Request { get; }
    Property Value
    Type
    Windows.Graphics.Printing.PrintTaskRequest
    Remarks

    The PrintTaskRequest class is used by an app to create a new PrintTask object. A PrintTask object is created in response to the PrintTaskRequested event and it indicates to the system that the app has content to be printed. When creating a PrintTask object using the CreatePrintTask method, the app must provide a name for the PrintTask and a PrintTaskSourceRequestedHandler event handler which is called when the content to be printed is required. An app should do the minimum amount of work possible in the PrintTaskRequested event handler since only a short amount of time is provided for a response.Wherever possible, the app should simply create a PrintTask and delay any content initialization until the PrintTaskSourceRequestedHandler event handler is called. If an app needs to perform an asynchronous operation during the PrintTaskRequested handler it must retrieve and use a PrintTaskRequestedDeferral object. Prior to the exit of the event handler, and typically before the asynchronous operation is started, the app must retrieve the PrintTaskRequestedDeferral object by calling the GetDeferral method of the PrintTaskRequest object. When the asynchronous operation completes, the app must call the Complete method of the PrintTaskRequestedDeferral object to signal that the print task request is complete.The call to the Complete method must occur before the Deadline is reached in order for the request to be accepted. The CreatePrintTask method in PrintTaskRequest can be used to create the print task. While performing the custom operation in PrintTaskRequested event, you have to set the PrintDocumentSource property in Windows.Graphics.Printing.PrintTaskSourceRequestedArgs.SetSource(Windows.Graphics.Printing.IPrintDocumentSource) which is the event args for event handler available in Windows.Graphics.Printing.PrintTaskRequest.CreatePrintTask(System.String,Windows.Graphics.Printing.PrintTaskSourceRequestedHandler) method.

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved