PrintTaskOptionDetails class
A collection of events, methods and properties for advanced print tasks.
Syntax
var printTaskOptionDetails = Windows.Graphics.Printing.OptionDetails.PrintTaskOptionDetails;
Attributes
- MarshalingBehaviorAttribute(Agile)
- MuseAttribute()
- StaticAttribute(Windows.Graphics.Printing.OptionDetails.IPrintTaskOptionDetailsStatic, NTDDI_WIN8)
- VersionAttribute(NTDDI_WIN8)
Members
The PrintTaskOptionDetails class has these types of members:
Events
The PrintTaskOptionDetails class has these events.
| Event | Description |
|---|---|
| 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.
| Method | Description |
|---|---|
| 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.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the list of print task options that are currently displayed. | |
| Read-only | Gets 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] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
