PrintCustomItemListOptionDetails
PrintCustomItemListOptionDetails
PrintCustomItemListOptionDetails
PrintCustomItemListOptionDetails
Class
Definition
Represents a list of the custom print task option items.
public : sealed class PrintCustomItemListOptionDetails : IPrintCustomItemListOptionDetails, IPrintCustomOptionDetails, IPrintItemListOptionDetails, IPrintOptionDetailspublic sealed class PrintCustomItemListOptionDetails : IPrintCustomItemListOptionDetails, IPrintCustomOptionDetails, IPrintItemListOptionDetails, IPrintOptionDetailsPublic NotInheritable Class PrintCustomItemListOptionDetails Implements IPrintCustomItemListOptionDetails, IPrintCustomOptionDetails, IPrintItemListOptionDetails, IPrintOptionDetails// You can use this class in JavaScript.
- Attributes
| 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:
// Create a new list option
// This code creates a new item list option that will be shown to the user
// pageFormat is an object of type: PrintCustomItemListOptionDetails
var pageFormat =
printDetailedOptions.createItemListOption("PageContent", "Pictures");
pageFormat.addItem("PicturesText", "Pictures and text");
pageFormat.addItem("PicturesOnly", "Pictures only");
pageFormat.addItem("TextOnly", "Text only");
// later in your app, when you want to access that list again
// and don’t have access to the pageFormat variable that was
// returned when the list was created, you can get it by
// looking up the same optionId that you used to create the list.
var printCustomItemListOptionDetails =
printDetailedOptions.options.lookup("PageContent");
Properties
DisplayName DisplayName DisplayName DisplayName
Gets or sets the display name of an item in the list of custom print task options.
public : PlatForm::String DisplayName { get; set; }public string DisplayName { get; set; }Public ReadWrite Property DisplayName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The display name of the option item.
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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
String that describes the error condition.
Items Items Items Items
Gets an item from the list of custom print tasks.
public : IVectorView<object> Items { get; }public IReadOnlyList<object> Items { get; }Public ReadOnly Property Items As IReadOnlyList<object>// You can use this property in JavaScript.
- Value
- IVectorView<PlatForm::Object> IReadOnlyList<object> IReadOnlyList<object> IReadOnlyList<object>
Pointer to the item.
OptionId OptionId OptionId OptionId
Gets the ID of a custom print task option.
public : PlatForm::String OptionId { get; }public string OptionId { get; }Public ReadOnly Property OptionId As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The option ID.
OptionType OptionType OptionType OptionType
Gets the option type for a custom print task option.
public : PrintOptionType OptionType { get; }public PrintOptionType OptionType { get; }Public ReadOnly Property OptionType As PrintOptionType// You can use this property in JavaScript.
The option type.
State State State State
Gets or sets the state of the list of custom print task option items.
public : PrintOptionStates State { get; set; }public PrintOptionStates State { get; set; }Public ReadWrite Property State As PrintOptionStates// You can use this property in JavaScript.
The state value.
Value Value Value Value
Gets or sets the value of the list of custom print tasks.
public : PlatForm::Object Value { get; }public object Value { get; }Public ReadOnly Property Value As object// You can use this property in JavaScript.
- Value
- PlatForm::Object object object object
The value of the list.
Methods
AddItem(String, String) AddItem(String, String) AddItem(String, String) AddItem(String, String)
Sets the ID or display name of an item in the list of custom print task options.
public : void AddItem(PlatForm::String itemId, PlatForm::String displayName)public void AddItem(String itemId, String displayName)Public Function AddItem(itemId As String, displayName As String) As void// You can use this method in JavaScript.
- itemId
- PlatForm::String String String String
The ID of the option item.
- displayName
- PlatForm::String String String String
The display name of the option item.
TrySetValue(Object) TrySetValue(Object) TrySetValue(Object) TrySetValue(Object)
Sets the value for the item ID or the display name of the custom item.
public : PlatForm::Boolean TrySetValue(PlatForm::Object value)public bool TrySetValue(Object value)Public Function TrySetValue(value As Object) As bool// You can use this method in JavaScript.
- value
- PlatForm::Object Object Object Object
Value for the item ID or the display name of the custom item.
Boolean value that indicates TRUE for a successful Get or Set, and FALSE for a failed Get or Set.
Remarks
To set the default value for a custom dropdown list of options, set the value explicitly. Otherwise, the adding order will be used.