Typing in Windows 8 in a C # / MonoGame Application

I am writing a WinRT game for Windows 8 in C # using the excellent MonoGame. I have reached the part where the user has reached a high score and must enter my name. It hurts me more than I expected, so I thought I would ask for help.

  • First of all, is there a simple β€œenter some text” function that I can call that looks like Guide.BeginShowKeyboardInput in Windows Phone 7, or the old InputBox command in VB? I use Windows.UI.Popups.MessageDialog to display simple dialog messages, but cannot find anything like this to request text from the user.

  • Otherwise, is there a way that I can easily use a small piece of XAML to present a text box for use by the user?

If none of them is possible, I think I will have to do all this ... I would then plan to intercept keystrokes and display the required text on the screen myself. Since I don’t have a physical tablet (just a simulator), I try my best to start with that. How can I:

  • Determine if the device has a physical keyboard, so I know whether to display the on-screen keyboard or not?

  • If there is no physical keyboard, how can I show and hide the on-screen keyboard?

Some of them sound like they should be easy to answer, but I still have to find answers to any of them.

Many thanks!

Adam.

+5
source share
2 answers

, . , XAML + Game, , xaml. . monogame rock.

. , XAML + Game , monogame.

https://github.com/mono/MonoGame/wiki/Windows-8-Project-Types

,

+4

- , FlyOut . FlyOut , . MessageDialog MonoGame, ( 3- ) " | ". .

+2

All Articles