Guide.BeginShowMessageBox Method (String, String, Generic IEnumerable, Int32, MessageBoxIcon, AsyncCallback, Object)
Begins the process of displaying a message box to which any user on the system can respond.
Namespace: Microsoft.Xna.Framework.GamerServices
Assembly: Microsoft.Xna.Framework.GamerServices (in microsoft.xna.framework.gamerservices.dll)
Syntax
public static IAsyncResult BeginShowMessageBox (
string title,
string text,
IEnumerable<string> buttons,
int focusButton,
MessageBoxIcon icon,
AsyncCallback callback,
Object state
)
Parameters
- title
Title of the message box. - text
Text that will be displayed by the message box. - buttons
Captions for message box buttons. The maximum number of buttons is two on Windows Phone, and three on Xbox 360 or Windows. - focusButton
Zero-based index specifying which button has the focus. - icon
Type of icon displayed in the message box. - callback
Method to be called once the asynchronous operation is finished. - state
User-created object uniquely identifying this request.
Return Value
An IAsyncResult used to track the progress of the method.
Exceptions
Exception type | Condition |
---|---|
InvalidOperationException | Either IsInitialized was not called previously, or a Guide user interface screen currently is active. |
Remarks
On Xbox 360, this overload allows any player on the system to respond to the message.
See Also
Tasks
Displaying a Message Box (Windows Phone, Windows, Xbox 360)
Working with Asynchronous Methods in XNA Game Studio
Reference
Guide Class
Guide Members
Microsoft.Xna.Framework.GamerServices Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7