PrintCustomTextOptionDetails 类

定义

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

public ref class PrintCustomTextOptionDetails sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PrintCustomTextOptionDetails final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PrintCustomTextOptionDetails
Public NotInheritable Class PrintCustomTextOptionDetails
继承
Object Platform::Object IInspectable PrintCustomTextOptionDetails
属性
实现

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 中引入)

注解

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

// This code creates a new custom text option. 
PrintCustomTextOptionDetails 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. 
PrintCustomTextOptionDetails printCustomTextOptionDetails =
    (PrintCustomTextOptionDetails)printDetailedOptions.Options["myCustomText"];

版本历史记录

Windows 版本 SDK 版本 已添加值
1803 17134 说明
1803 17134 WarningText

属性

Description

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

DisplayName

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

ErrorText

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

MaxCharacters

获取或设置自定义打印任务选项的显示名称的最大字符数。

OptionId

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

OptionType

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

State

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

Value

获取或设置自定义打印任务选项的值。

WarningText

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

方法

TrySetValue(Object)

设置自定义打印任务的值。

适用于