Share via


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)

Syntax

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

Parameters

  • player
    Gamer composing the message.

  • text
    Text of the message.

  • recipients
    Collection of gamers receiving the message.

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

Exceptions

Exception type Condition
ArgumentOutOfRangeException For Windows applications, this exception is thrown if player is not PlayerIndex.One.
ArgumentException The 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.

Remarks

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.

See Also

Reference

GamerPrivileges.AllowCommunication Property
Guide Class
Guide Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista