共用方式為


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

適用於

另請參閱