Bagikan melalui


UserActivityRequestedEventArgs Kelas

Definisi

Diteruskan ke peristiwa UserActivityRequestManager.UserActivityRequested . Memungkinkan handler peristiwa untuk meneruskan kembali 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
Warisan
Object Platform::Object IInspectable UserActivityRequestedEventArgs
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10, version 1803 (diperkenalkan dalam 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v6.0)

Contoh

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);
}

Properti

Request

Mendapatkan UserActivityRequest yang terkait dengan panggilan ke penanganan aktivitas UserActivityRequestManager.UserActivityRequested .

Metode

GetDeferral()

Mendapatkan objek penangguhan sehingga Anda dapat memiliki lebih banyak waktu untuk menangani peristiwa UserActivityRequestManager.UserActivityRequested .

Berlaku untuk