PrintCustomItemListOptionDetails Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a list of the custom print task option items.
public ref class PrintCustomItemListOptionDetails sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PrintCustomItemListOptionDetails final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PrintCustomItemListOptionDetails
Public NotInheritable Class PrintCustomItemListOptionDetails
- Inheritance
- 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
Here is a 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.
PrintCustomItemListOptionDetails pageFormat =
printDetailedOptions.CreateItemListOption("PageContent", "Pictures");
pageFormat.AddItem("PicturesText", "Pictures and text");
pageFormat.AddItem("PicturesOnly", "Pictures only");
pageFormat.AddItem("TextOnly", "Text only");
// Add the custom option to the option list.
printDetailedOptions.DisplayedOptions.Add("PageContent");
// Later in your app, when you want to access the list created above,
// but you 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.
PrintCustomItemListOptionDetails printCustomItemListOptionDetails =
(PrintCustomItemListOptionDetails)printDetailedOptions.Options["PageContent"];
Version history
Windows version | SDK version | Value added |
---|---|---|
1803 | 17134 | AddItem(String,String,String,IRandomAccessStreamWithContentType) |
1803 | 17134 | Description |
1803 | 17134 | WarningText |
Properties
Description |
Gets or sets the description for the print custom item list option. |
DisplayName |
Gets or sets the display name of an item in the list of custom print task options. |
ErrorText |
Gets or sets the string for an error condition. |
Items |
Gets an item from the list of custom print tasks. |
OptionId |
Gets the ID of a custom print task option. |
OptionType |
Gets the option type for a custom print task option. |
State |
Gets or sets the state of the list of custom print task option items. |
Value |
Gets or sets the value of the list of custom print tasks. |
WarningText |
Gets or sets a string for a warning condition. |
Methods
AddItem(String, String) |
Sets the ID or display name of an item in the list of custom print task options. |
AddItem(String, String, String, IRandomAccessStreamWithContentType) |
Sets the item ID, display name, description, or icon in the list of custom print item options. |
TrySetValue(Object) |
Sets the value for the item ID or the display name of the custom item. |