Share via


PerceptionControlSession.TrySetPropertyAsync(String, Object) Method

Definition

Creates a property change request. This request is asynchronously processed, and is not guaranteed to succeed. The property change result should be inspected to determine if the property change was actually accepted and, if it was not, the reason why the property change was not accepted.

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)

Parameters

name
String

Platform::String

winrt::hstring

The name of the property to change.

value
Object

Platform::Object

IInspectable

The new property value.

Returns

This method asynchronously returns the result of the property change request.

Attributes

Applies to