PrintTaskOptionDetails Class

Definition

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

public ref class PrintTaskOptionDetails sealed : IPrintTaskOptionsCore, IPrintTaskOptionsCoreUIConfiguration
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PrintTaskOptionDetails final : IPrintTaskOptionsCore, IPrintTaskOptionsCoreUIConfiguration
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PrintTaskOptionDetails : IPrintTaskOptionsCore, IPrintTaskOptionsCoreUIConfiguration
Public NotInheritable Class PrintTaskOptionDetails
Implements IPrintTaskOptionsCore, IPrintTaskOptionsCoreUIConfiguration
Inheritance
Object Platform::Object IInspectable PrintTaskOptionDetails
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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.

Here is a code snippet that shows how to retrieve the advanced options for a print task and then set the order in which they will be displayed in the print window of the app.

//  Retrieve the advanced Print Task Options.
PrintTaskOptionDetails printDetailedOptions = 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.Add(StandardPrintTaskOptions.Copies);
printDetailedOptions.DisplayedOptions.Add(StandardPrintTaskOptions.Orientation);
printDetailedOptions.DisplayedOptions.Add(StandardPrintTaskOptions.ColorMode);

For more information on this and other printing scenarios, see Printing on the Windows Dev Center.

Version history

Windows version SDK version Value added
1803 17134 CreateToggleOption

Properties

DisplayedOptions

Gets the list of print task options that are currently displayed.

Options

Gets the list of options for the advanced print task.

Methods

CreateItemListOption(String, String)

Creates a custom list of items that allow the user to choose the page format.

CreateTextOption(String, String)

Creates a CustomPrintTaskOptionText object to handle the display name and other parameters of the advanced print task option item.

CreateToggleOption(String, String)

Creates a PrintCustomToggleOptionDetails object to handle the display name and other parameters of the advanced print task option item.

GetFromPrintTaskOptions(PrintTaskOptions)

Used to retrieve the available options for a print task.

GetPageDescription(UInt32)

Returns a PrintPageDescription object for the referenced page number.

Events

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.

Applies to

See also