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 事件。 |