Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PrintTaskOptionDetails class

Applies to Windows only

A collection of events, methods and properties for advanced print tasks.

Syntax


var printTaskOptionDetails = Windows.Graphics.Printing.OptionDetails.PrintTaskOptionDetails;

Attributes

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

Members

The PrintTaskOptionDetails class has these types of members:

Events

The PrintTaskOptionDetails class has these events.

EventDescription
BeginValidation Raised when the print system begins a validation pass on the current state of the print ticket.
OptionChanged Raised when any one of the advanced print task options is changed.

 

Methods

The PrintTaskOptionDetails class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
CreateItemListOption Creates a custom list of items that allow the user to choose the page format.
CreateTextOption Creates a CustomPrintTaskOptionText object to handle the display name and other parameters of the advanced print task option item.
GetFromPrintTaskOptions Used to retrieve the available options for a print task.
GetPageDescription Returns a PrintPageDescription object for the referenced page number.

 

Properties

The PrintTaskOptionDetails class has these properties.

PropertyAccess typeDescription

DisplayedOptions

Read-onlyGets the list of print task options that are currently displayed.

Options

Read-onlyGets the list of options for the advanced print task.

 

Remarks

You can use PrintTaskOptionDetails to retrieve information about the available options for a print task and to add custom options to the print experience. If you develop in JavaScript, however, you must use Direct2D printing to change the preview or print content based on option changes. This is because print template is not supported. For more information about Direct2D printing, see Printing and command lists. Here is a JavaScript code snippet that shows how to retrieve the advanced options for a print task, and then to indicate the order in which they will be displayed in the print window of the app:


   //  Retrieve the advanced Print Task Options
        var printDetailedOptions = 
            Windows.Graphics.Printing.OptionDetails.PrintTaskOptionDetails.getFromPrintTaskOptions(printTask.options);

   // Choose the printer options to be shown.
   // The order in which the options are appended determines the order in which they appear in the UI
        printDetailedOptions.displayedOptions.clear();

        printDetailedOptions.displayedOptions.append(Windows.Graphics.Printing.StandardPrintTaskOptions.copies);
        printDetailedOptions.displayedOptions.append(Windows.Graphics.Printing.StandardPrintTaskOptions.orientation);
        printDetailedOptions.displayedOptions.append(Windows.Graphics.Printing.StandardPrintTaskOptions.colorMode);


Notice that the actual retrieval of the options is done by the getFromPrintTaskOptions method in this class.

To see the complete listing for this, and other printing scenarios using PrintTaskOptionDetails, see Printing.

Requirements

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.Graphics.Printing.OptionDetails
Windows::Graphics::Printing::OptionDetails [C++]

Metadata

Windows.winmd

See also

getFromPrintTaskOptions

 

 

Show:
© 2014 Microsoft