PerceptionControlSession.TrySetPropertyAsync(String, Object) 方法

定义

创建属性更改请求。 此请求是异步处理的,不保证成功。 应检查属性更改结果,以确定属性更改是否实际被接受,如果未接受,则确定未接受属性更改的原因。

public:
 virtual IAsyncOperation<PerceptionFrameSourcePropertyChangeResult ^> ^ TrySetPropertyAsync(Platform::String ^ name, Platform::Object ^ value) = TrySetPropertyAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetPropertyAsync(winrt::hstring const& name, IInspectable const& value);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("PerceptionControlSession may be unavailable after Windows Creator Update.  Please refer to Windows.Media.Capture.Frames APIs on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetPropertyAsync(winrt::hstring const& name, IInspectable const& value);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetPropertyAsync(string name, object value);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("PerceptionControlSession may be unavailable after Windows Creator Update.  Please refer to Windows.Media.Capture.Frames APIs on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetPropertyAsync(string name, object value);
function trySetPropertyAsync(name, value)
Public Function TrySetPropertyAsync (name As String, value As Object) As IAsyncOperation(Of PerceptionFrameSourcePropertyChangeResult)

参数

name
String

Platform::String

winrt::hstring

要更改的属性的名称。

value
Object

Platform::Object

IInspectable

新的属性值。

返回

此方法异步返回属性更改请求的结果。

属性

适用于