PrintCustomItemListOptionDetails 类

定义

表示自定义打印任务选项项的列表。

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
继承
Object Platform::Object IInspectable PrintCustomItemListOptionDetails
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

下面是一个代码片段,演示如何检索 对象:

// 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"];

版本历史记录

Windows 版本 SDK 版本 已添加值
1803 17134 AddItem (String,String,String,String,IRandomAccessStreamWithContentType)
1803 17134 说明
1803 17134 WarningText

属性

Description

获取或设置打印自定义项列表选项的说明。

DisplayName

获取或设置自定义打印任务选项列表中的项的显示名称。

ErrorText

获取或设置错误条件的字符串。

Items

从自定义打印任务列表中获取项。

OptionId

获取自定义打印任务选项的 ID。

OptionType

获取自定义打印任务选项的选项类型。

State

获取或设置自定义打印任务选项项列表的状态。

Value

获取或设置自定义打印任务列表的值。

WarningText

获取或设置警告条件的字符串。

方法

AddItem(String, String)

设置自定义打印任务选项列表中的项的 ID 或显示名称。

AddItem(String, String, String, IRandomAccessStreamWithContentType)

设置自定义打印项选项列表中的项 ID、显示名称、说明或图标。

TrySetValue(Object)

设置自定义项的项 ID 或显示名称的值。

适用于