Share via


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.

Syntax

'Declaration
Public Shared Function BeginShowMessageBox ( _
         title As String, _
         text As String, _
         buttons As IEnumerable(Of String), _
         focusButton As Integer, _
         icon As MessageBoxIcon, _
         callback As AsyncCallback, _
         state As Object _
) As IAsyncResult 
public static IAsyncResult BeginShowMessageBox (
         string title,
         string text,
         IEnumerable<string> buttons,
         int focusButton,
         MessageBoxIcon icon,
         AsyncCallback callback,
         Object state
)
public:
static IAsyncResult BeginShowMessageBox(
         String title,
         String text,
         IEnumerable<String> buttons,
         int focusButton,
         MessageBoxIcon icon,
         AsyncCallback callback,
         Object state
)

Parameters

  • title
    Type: String
    Title of the message box.
  • text
    Type: String
    Text that will be displayed by the message box.
  • buttons
    Type: IEnumerable<String>
    Captions for message box buttons. The maximum number of buttons is two on Windows Phone.
  • focusButton
    Type: Int32
    Zero-based index specifying which button has the focus.
  • icon
    Type: MessageBoxIcon
    Type of icon displayed in the message box.
  • callback
    Type: AsyncCallback
    Method to be called once the asynchronous operation is finished.
  • state
    Type: Object
    User-created object uniquely identifying this request.

Return Value

Type: IAsyncResult
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.

Requirements

Namespace: Microsoft.Xna.Framework.GamerServices

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

See Also

Tasks

Displaying a Message Box
Working with Asynchronous Methods in XNA Game Studio

Reference

Guide Class
Guide Members
Microsoft.Xna.Framework.GamerServices Namespace

Platforms

Windows Phone