PrintCustomTextOptionDetails PrintCustomTextOptionDetails PrintCustomTextOptionDetails PrintCustomTextOptionDetails Class

Definition

Represents a custom print task option.

public : sealed class PrintCustomTextOptionDetails : IPrintCustomOptionDetails, IPrintCustomTextOptionDetails, IPrintOptionDetails
public sealed class PrintCustomTextOptionDetails : IPrintCustomOptionDetails, IPrintCustomTextOptionDetails, IPrintOptionDetails
Public NotInheritable Class PrintCustomTextOptionDetails Implements IPrintCustomOptionDetails, IPrintCustomTextOptionDetails, 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:

// This code creates a new custom text option and returns a 
// customTextOption is an object of type: PrintCustomTextOptionDetails 
var customTextOption =
      printDetailedOptions.createTextOption("myCustomText", "Custom Options");

// later in your app, when you want to access the custom text option created above,
// but you don’t have access to the customTextOption variable that was returned 
// when it was created, you can get it by looking up the same optionId that 
// you used to create it. 
var printCustomTextOptionDetails =
      printDetailedOptions.options.lookup("myCustomText");

Properties

DisplayName DisplayName DisplayName DisplayName

Gets or sets the display name of the custom print task option.

public : Platform::String DisplayName { get; set; }
public string DisplayName { get; set; }
Public ReadWrite Property DisplayName As string
var string = printCustomTextOptionDetails.displayName;
printCustomTextOptionDetails.displayName = string;
Value
Platform::String string string string

The display name of the option.

ErrorText ErrorText ErrorText ErrorText

Gets or sets the string for an error condition.

public : Platform::String ErrorText { get; set; }
public string ErrorText { get; set; }
Public ReadWrite Property ErrorText As string
var string = printCustomTextOptionDetails.errorText;
printCustomTextOptionDetails.errorText = string;
Value
Platform::String string string string

String that describes the error condition.

MaxCharacters MaxCharacters MaxCharacters MaxCharacters

Gets or sets the maximum number of characters for the display name of the custom print task option.

public : unsigned int MaxCharacters { get; set; }
public uint MaxCharacters { get; set; }
Public ReadWrite Property MaxCharacters As uint
var uint = printCustomTextOptionDetails.maxCharacters;
printCustomTextOptionDetails.maxCharacters = uint;
Value
unsigned int uint uint uint

The maximum number of characters.

OptionId OptionId OptionId OptionId

Gets the ID of the custom print task option.

public : Platform::String OptionId { get; }
public string OptionId { get; }
Public ReadOnly Property OptionId As string
var string = printCustomTextOptionDetails.optionId;
Value
Platform::String string string string

The ID of the custom option.

OptionType OptionType OptionType OptionType

Gets the option type for the custom print task option.

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

State State State State

Gets or sets the state of a custom print task option.

public : PrintOptionStates State { get; set; }
public PrintOptionStates State { get; set; }
Public ReadWrite Property State As PrintOptionStates
var printOptionStates = printCustomTextOptionDetails.state;
printCustomTextOptionDetails.state = printOptionStates;

Value Value Value Value

Gets or sets the value of a custom print task option.

public : Platform::Object Value { get; }
public object Value { get; }
Public ReadOnly Property Value As object
var object = printCustomTextOptionDetails.value;
Value
Platform::Object object object object

The value of the custom option.

Methods

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

Sets the value for the custom print task.

public : Platform::Boolean TrySetValue(Platform::Object value)
public bool TrySetValue(Object value)
Public Function TrySetValue(value As Object) As bool
var bool = printCustomTextOptionDetails.trySetValue(value);
Parameters
value
Platform::Object Object Object Object

Value for the custom print task.

Returns
Platform::Boolean bool bool bool

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