Windows Dev Center

PrintNotificationEventDetails class

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

Syntax


Public NotInheritable Class PrintNotificationEventDetails

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The PrintNotificationEventDetails class has these types of members:

Properties

The PrintNotificationEventDetails class has these properties.

PropertyAccess typeDescription

EventData

Read/writeGets or sets the event data for a print notification event.

PrinterName

Read-onlyGets the name of the print device associated with the print notification.

 

Remarks

Background task handler can use local storage to save the printerName and eventData in Windows.Devices.Printers.Extensions.PrintNotificationEventDetails, 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 PrintNotificationEventDetails, see the Windows Store device app for Printers whitepaper.

Requirements (device family)

Device family

Desktop

API contract

Windows.Devices.Printers.Extensions.ExtensionsContract, introduced version 1.0

Namespace

Windows.Devices.Printers.Extensions
Windows::Devices::Printers::Extensions [C++]

Metadata

Windows.Devices.Printers.Extensions.ExtensionsContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

Windows.Devices.Printers.Extensions
Windows::Devices::Printers::Extensions [C++]

Metadata

Windows.winmd

See also

Object
Windows Store device app for Printers

 

 

Show:
© 2015 Microsoft