UserActivityRequest.SetUserActivity(UserActivity) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the UserActivity to return when the UserActivityRequested event is raised.
public:
virtual void SetUserActivity(UserActivity ^ activity) = SetUserActivity;
void SetUserActivity(UserActivity const& activity);
public void SetUserActivity(UserActivity activity);
function setUserActivity(activity)
Public Sub SetUserActivity (activity As UserActivity)
Parameters
- activity
- UserActivity
The user activity to store.
Examples
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);
}
Remarks
UserActivity.ActivationUri and UserActivity.VisualElements.DisplayText must be set or this method will fail.