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.GamerServices (in microsoft.xna.framework.gamerservices.dll)

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

Parameters

player
Type: PlayerIndex
Gamer composing the message.
text
Type: String
Text of the message.
recipients
Type: IEnumerable<Gamer>
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 also is thrown if any recipients have a value of null or if there are more than 100 recipients.
NotSupportedExceptionThis method is not supported on the current platform.

Bb975988.note(en-us,XNAGameStudio.41).gifWindows Phone Specific Information
This method cannot be used on Windows Phone. If called, it throws a NotSupportedException.
Bb975988.bp(en-us,XNAGameStudio.41).gifBest Practice

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

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show: