SystemUI.ShowAddRemoveFriendAsync Method

Shows the add/remove friend user interface.

Syntax

public:
static IAsyncOperation<AddRemoveFriendResult^ >^ ShowAddRemoveFriendAsync(
         IUser^ requestingUser,
         String^ targetUserId
)  

Parameters

requestingUser
Type: IUser 

The user initiating the add or remove.

targetUserId
Type: String 

 The XUID of the user being added or removed.

Return value

Type: IAsyncOperation<AddRemoveFriendResult^ > 

Returns an IAsyncOperation<TResult> object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncOperation<TResult>.Completed property. When the asynchronous operation is complete, the result of the operation can be retrieved by using the IAsyncOperation<TResult>.GetResults method.

Requirements

Namespace: Windows.Xbox.UI

Metadata: windows.winmd

Remarks

This method displays an interface that allows the adding and removing of people from the XBox LIVE favorites list. This should be called by titles implementing an ‘Add Friend’ capability.

If the target is not on the calling user’s friends list, the dialog below will appear:

If the target is already on the calling user’s friends list, the dialog will change to ask the user if they want to change their relationship with them (and the options will instead be Friend/Favorite/No relationship)

When the user clicks either Friend or Favorite a quick confirmation is shown, then automatically dismisses, as shown below:

See also

Reference

SystemUI Class

SystemUI Members

Windows.Xbox.UI Namespace