Sdílet prostřednictvím


Guide.BeginShowKeyboardInput Method

Begins the process for displaying a dialog for keyboard input from a gamer. The display operation is performed asynchronously.

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

Syntax

public static IAsyncResult BeginShowKeyboardInput (
         PlayerIndex player,
         string title,
         string description,
         string defaultText,
         AsyncCallback callback,
         Object state
)

Parameters

  • player
    Index of the player providing input. For Windows-based XNA games, the only valid option is PlayerIndex.One.
  • title
    Title of the dialog box.
  • description
    Text of the dialog box.
  • defaultText
    Text displayed when the dialog box is initially shown.
  • callback
    The method to be called once the asynchronous operation has finished.
  • state
    A user-created object uniquely identifying this request.

Return Value

An IAsyncResult used to track the progress of the method.

Exceptions

Exception type Condition
ArgumentException title, description, or defaultText is larger than the maximum allowed string length of 260 characters.
ArgumentOutOfRangeException player is not a valid value. For Windows-based XNA games, the only valid option is PlayerIndex.One.

See Also

Reference

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

Platforms

Xbox 360, Windows XP SP2, Windows Vista