PrintNotificationEventDetails PrintNotificationEventDetails PrintNotificationEventDetails PrintNotificationEventDetails Class

Contains properties that allow a client to access and/or manipulate print event data and print device name information.

Syntax

Declaration

public sealed class PrintNotificationEventDetailspublic sealed class PrintNotificationEventDetailsPublic NotInheritable Class PrintNotificationEventDetails

Remarks

Background task handlers can use local storage to save the PrinterName and EventData values of the PrintNotificationEventDetails class, so that the information can be used later by an app.

    // Save the printer name and asyncUI xml
    //
    var keyPrinterName = "BA5857FA-DE2C-4A4A-BEF2-49D8B4130A39";
    var keyAsyncUIXML = "55DCA47A-BEE9-43EB-A7C8-92ECA2FA0685";
    var settings = Windows.Storage.ApplicationData.current.localSettings;

    //
    // The background task instance's activation parameters are available
    // via Windows.UI.WebUI.WebUIBackgroundTaskInstance.current
    //
    var backgroundTaskInstance = Windows.UI.WebUI.WebUIBackgroundTaskInstance.current;

    // Save data into a user-defined var, "settings" 
    var details = backgroundTaskInstance.triggerDetails;
    settings.values[keyPrinterName] = details.printerName;
    settings.values[keyAsyncUIXML] = details.eventData;

    // Save directly into PrintNotificationEventDetails
    Windows.Devices.Printers.Extensions.PrintNotificationEventDetails = details;

For more information about using the PrintNotificationEventDetails class, see the Windows Store device apps for printers topic on the Hardware Dev Center.

Properties summary

Gets or sets the event data for a print notification event.

Gets the name of the print device associated with the print notification.

Properties

  • EventData
    EventData
    EventData
    EventData

    Gets or sets the event data for a print notification event.

    public string EventData { get; set; }public string EventData { get; set; }Public ReadWrite Property EventData As string

    Property Value

    • string
      string
      string
      string

      The print notification event data.

    Remarks

    The property is nested XML that is formatted as string. To get this property, parse for the Bidi request and response schema that is embedded in an <Envelope>, following the AsyncUI's balloonUI element message, which contains the action element. The action element contains the <Envelope> where the Bidi response schema is found. Examine the Bidi response to determine the cause of the event.

  • PrinterName
    PrinterName
    PrinterName
    PrinterName

    Gets the name of the print device associated with the print notification.

    public string PrinterName { get; }public string PrinterName { get; }Public ReadOnly Property PrinterName As string

    Property Value

    • string
      string
      string
      string

      The print device name.

Device family

Windows Desktop Extension SDK (introduced v10.0.10240.0)

API contract

Windows.Devices.Printers.Extensions.ExtensionsContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.Devices.Printers.Extensions.dll