PrintMediaTypeOptionDetails PrintMediaTypeOptionDetails PrintMediaTypeOptionDetails PrintMediaTypeOptionDetails PrintMediaTypeOptionDetails Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Represents the list of print media type options.

public : sealed class PrintMediaTypeOptionDetails : IPrintItemListOptionDetails, IPrintOptionDetails
struct winrt::Windows::Graphics::Printing::OptionDetails::PrintMediaTypeOptionDetails : IPrintItemListOptionDetails, IPrintOptionDetails
public sealed class PrintMediaTypeOptionDetails : IPrintItemListOptionDetails, IPrintOptionDetails
Public NotInheritable Class PrintMediaTypeOptionDetails Implements IPrintItemListOptionDetails, IPrintOptionDetails
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Here is a JavaScript code snippet that shows how to retrieve the object:

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

// get the object
var printMediaTypeOptionDetails = 
     printDetailedOptions.options.lookup(Windows.Graphics.Printing.StandardPrintTaskOptions.mediaType);

Properties

Description Description Description Description Description

Prerelease. Gets or sets the description of the print media type option.

public : Platform::String Description { get; set; }
winrt::hstring Description(); void Description(winrt::hstring description);
public string Description { get; set; }
Public ReadWrite Property Description As string
var string = printMediaTypeOptionDetails.description;
printMediaTypeOptionDetails.description = string;
Value
string string string

String that describes the print media type option.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.17095.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

ErrorText ErrorText ErrorText ErrorText ErrorText

Gets or sets the string for an error condition.

public : Platform::String ErrorText { get; set; }
winrt::hstring ErrorText(); void ErrorText(winrt::hstring errortext);
public string ErrorText { get; set; }
Public ReadWrite Property ErrorText As string
var string = printMediaTypeOptionDetails.errorText;
printMediaTypeOptionDetails.errorText = string;
Value
string string string

String that describes the error condition.

Items Items Items Items Items

Gets the list of items for the print media type options.

public : IVectorView<Platform::Object> Items { get; }
IVectorView<winrt::Windows::Foundation::IInspectable> Items();
public IReadOnlyList<object> Items { get; }
Public ReadOnly Property Items As IReadOnlyList<object>
var iReadOnlyList = printMediaTypeOptionDetails.items;
Value
IReadOnlyList<object> IReadOnlyList<object> IReadOnlyList<object>

A pointer to the list of media type options.

OptionId OptionId OptionId OptionId OptionId

Gets the ID for the print media type option.

public : Platform::String OptionId { get; }
winrt::hstring OptionId();
public string OptionId { get; }
Public ReadOnly Property OptionId As string
var string = printMediaTypeOptionDetails.optionId;
Value
string string string

The ID for the media type option.

OptionType OptionType OptionType OptionType OptionType

Gets the option type for the print media type option.

public : PrintOptionType OptionType { get; }
PrintOptionType OptionType();
public PrintOptionType OptionType { get; }
Public ReadOnly Property OptionType As PrintOptionType
var printOptionType = printMediaTypeOptionDetails.optionType;

State State State State State

Gets or sets the state for the print media type option.

public : PrintOptionStates State { get; set; }
PrintOptionStates State(); void State(PrintOptionStates state);
public PrintOptionStates State { get; set; }
Public ReadWrite Property State As PrintOptionStates
var printOptionStates = printMediaTypeOptionDetails.state;
printMediaTypeOptionDetails.state = printOptionStates;
Value
PrintOptionStates PrintOptionStates PrintOptionStates

The state of the media type option.

Value Value Value Value Value

Gets or sets the enumerated value of the print media type option.

public : Platform::Object Value { get; }
winrt::Windows::Foundation::IInspectable Value();
public object Value { get; }
Public ReadOnly Property Value As object
var object = printMediaTypeOptionDetails.value;
Value
object object object

The enumerated value of the media type option.

WarningText WarningText WarningText WarningText WarningText

Prerelease. Gets or sets a string for a warning condition.

public : Platform::String WarningText { get; set; }
winrt::hstring WarningText(); void WarningText(winrt::hstring warningtext);
public string WarningText { get; set; }
Public ReadWrite Property WarningText As string
var string = printMediaTypeOptionDetails.warningText;
printMediaTypeOptionDetails.warningText = string;
Value
string string string

String that describes a warning condition.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.17095.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Methods

TrySetValue(Object) TrySetValue(Object) TrySetValue(Object) TrySetValue(Object) TrySetValue(Object)

Sets the value for the media type option.

public : Platform::Boolean TrySetValue(Platform::Object value)
bool TrySetValue(winrt::Windows::Foundation::IInspectable value) const;
public bool TrySetValue(Object value)
Public Function TrySetValue(value As Object) As bool
var bool = printMediaTypeOptionDetails.trySetValue(value);
Parameters
value
Object Object Object

Value for the media type option.

Returns
bool bool bool

Boolean value that indicates TRUE for a successful Get or Set, and FALSE for a failed Get or Set.