UserActivityRequestedEventArgs 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
传递给 UserActivityRequestManager.UserActivityRequested 事件。 允许事件的处理程序传回 UserActivity。
public ref class UserActivityRequestedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UserActivityRequestedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UserActivityRequestedEventArgs
Public NotInheritable Class UserActivityRequestedEventArgs
- 继承
- 属性
Windows 要求
设备系列 |
Windows 10, version 1803 (在 10.0.17134.0 中引入)
|
API contract |
Windows.Foundation.UniversalApiContract (在 v6.0 中引入)
|
示例
private async void UserActivityRequested(
Windows.ApplicationModel.UserActivities.UserActivityRequestManager sender,
Windows.ApplicationModel.UserActivities.UserActivityRequestedEventArgs args)
{
UserActivity userActivity = // app code to create a userActivity
args.Request.SetUserActivity(userActivity);
}
属性
Request |
获取与调用 UserActivityRequestManager.UserActivityRequested 事件处理程序关联的 UserActivityRequest。 |
方法
GetDeferral() |
获取延迟对象,以便有更多时间处理 UserActivityRequestManager.UserActivityRequested 事件。 |