UserActivityRequest 类

定义

作为参数传递给 UserActivityRequestManager.UserActivityRequested 事件。 用于将 UserActivity 返回给调用方。

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

Windows 要求

设备系列
Windows 10, version 1803 (在 10.0.17134.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v6.0 中引入)

注解

如果系统正在执行要与应用中的新用户活动关联的操作,系统会引发 UserActivityRequestManager.UserActivityRequested 事件,并且应用通过事件参数返回 UserActivity

方法

SetUserActivity(UserActivity)

设置在引发 UserActivityRequested 事件时返回的 UserActivity。

适用于

另请参阅