ClaimedLineDisplay.TrySetDescriptorAsync 方法

定义

尝试使用指定的属性异步设置描述符。

public:
 virtual IAsyncOperation<bool> ^ TrySetDescriptorAsync(unsigned int descriptor, LineDisplayDescriptorState descriptorState) = TrySetDescriptorAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySetDescriptorAsync(uint32_t const& descriptor, LineDisplayDescriptorState const& descriptorState);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySetDescriptorAsync(uint descriptor, LineDisplayDescriptorState descriptorState);
function trySetDescriptorAsync(descriptor, descriptorState)
Public Function TrySetDescriptorAsync (descriptor As UInteger, descriptorState As LineDisplayDescriptorState) As IAsyncOperation(Of Boolean)

参数

descriptor
UInt32

unsigned int

uint32_t

要设置的描述符。 值必须介于 0 和 LineDisplayCapabilities.SupportedDescriptors - 1 之间。

descriptorState
LineDisplayDescriptorState

要提供给描述符的状态。

返回

如果成功设置描述符,则返回 True;否则为 False。

属性

Windows 要求

设备系列
Windows 10 Fall Creators Update (在 10.0.16299.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v5.0 中引入)

注解

LineDisplayCapabilities.SupportedDescriptors 必须大于零才能成功执行此方法。

适用于