共用方式為


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 必須大於零,這個方法才能順利執行。

適用於