StandardPrintTaskOptions Class

Definition

Provides access to the canonical names for the options represented by the PrintTaskOptions class. You can use the StandardPrintTaskOptions class to identify print options displayed in the user experience or to retrieve specific options using the PrintTaskOptionDetails class.

public ref class StandardPrintTaskOptions abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class StandardPrintTaskOptions final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class StandardPrintTaskOptions
Public Class StandardPrintTaskOptions
Inheritance
Object Platform::Object IInspectable StandardPrintTaskOptions
Attributes

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

The StandardPrintTaskOptions class provides the canonical names for the common print task options used in the PrintTaskOptions object. These names may be used to add or remove items from the PrintTaskOptions.DisplayedOptions list to indicate the options that appear in the print preview UI. For more information, see Customize the print preview UI. These names may also be used with the PrintTaskOptionDetails object to locate the standard options in the list of options. These names are considered to be unique, and any attempt to create options of the same name will be rejected.

Here is a code snippet that you could use, for example, to append the standard print task options to be displayed in the UI:

// 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
displayedOptions.Clear();
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.Copies);
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.Orientation);
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.MediaSize);
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.Collation);
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.Duplex);

For more information on this and other printing scenarios, see Printing and the UWP print sample.

Version history

Windows version SDK version Value added
1607 14393 Bordering
1803 17134 CustomPageRanges

Properties

Binding

Gets the canonical name for the binding option of the print task.

Bordering

Gets the canonical name of the bordering option for the print task.

Collation

Gets the canonical name for collation option of the print task.

ColorMode

Gets the canonical name for color mode option of the print task.

Copies

Gets the canonical name for the copies option of the print task.

CustomPageRanges

Gets the canonical name for the custom page ranges option for the print task.

Duplex

Gets the canonical name for the duplex option of the print task.

HolePunch

Gets the canonical name for the hole punch option of the print task.

InputBin

Gets the canonical name for the input bin option of the print task.

MediaSize

Gets the canonical name for the media size option of the print task.

MediaType

Gets the canonical name for the media type option of the print task.

NUp

Gets the canonical name for the NUp (pages per sheet) option of the print task.

Orientation

Gets the canonical name for the orientation option of the print task.

PrintQuality

Gets the canonical name for the print quality option of the print task.

Staple

Gets the canonical name for the staple option of the print task.

Applies to

See also