Guide.ShowComposeMessage Method

Shows the Compose Message user interface. A gamer uses this user interface to write messages to other gamers.

Namespace: Microsoft.Xna.Framework.GamerServices
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public static void ShowComposeMessage (
         PlayerIndex player,
         string text,
         IEnumerable<Gamer> recipients


Gamer composing the message.
Text of the message.
Collection of gamers receiving the message.

If this is null, the Select Gamertag user interface is displayed.

Exception typeCondition
ArgumentOutOfRangeExceptionFor Windows applications, this exception is thrown if player is not PlayerIndex.One.
ArgumentExceptionThe message text is null, empty, or exceeds 200 characters. This exception is also thrown if any recipients have a value of null or if there are more than 100 recipients.

Bb975988.bp(en-US,XNAGameStudio.30).gifBest Practice

You can check GamerPrivileges.AllowCommunication to determine if a player is allowed to send and receive communications prior to displaying a menu option that would call this method.

Xbox 360, Windows XP SP2, Windows Vista

Community Additions