Guide.ShowComposeMessage Method
Shows the Compose Message user interface. A gamer uses this user interface to write messages to other gamers.
Syntax
'Declaration
Public Shared Sub ShowComposeMessage ( _
player As PlayerIndex, _
text As String, _
recipients As IEnumerable(Of Gamer) _
)
public static void ShowComposeMessage (
PlayerIndex player,
string text,
IEnumerable<Gamer> recipients
)
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.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | The 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. |
NotSupportedException | This method is not supported on the current platform. |
Remarks
Windows Phone Specific Information |
---|
This method cannot be used on Windows Phone. If called, it throws a NotSupportedException. |
Best 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. |
Requirements
Namespace: Microsoft.Xna.Framework.GamerServices
Assembly: Microsoft.Xna.Framework.GamerServices (in microsoft.xna.framework.gamerservices.dll)
See Also
Reference
GamerPrivileges.AllowCommunication Property
Guide Class
Guide Members
Microsoft.Xna.Framework.GamerServices Namespace
Platforms
Windows Phone