We have an our own GUI in our DirectX based game engine. We are porting now this engine to Metro style. How we can implement a touch keyboard for our GUI (for TextBox for example)?


  • Our game engine is using only DirectX and on C++/CX. We don't using a XAML.

    I read that it needs to deriving from the ITextProvider and IValueProvider. But I couldn't found any full example or overview how to do this.

    Here is the sample from MS:


    But seems like it's using a XAML. And I could not to start it on my tablet (I have not any idea why, I saw just blank screen).

    It is possible at all to implement a TextBox custom control for example, without XAML on C++/CX?

    All I need is to bring up a touch keyboard and get from it a chars...

    • Edited by hellobody Friday, August 10, 2012 9:37 AM just one more thing
    Friday, August 10, 2012 9:32 AM


  • I've already answered this in your other thread. Please don't post duplicate questions. I'm copying that answer here and locking this as a dupe.

    The keyboard will automatically be shown when the user sets focus to a text control. See the touch keyboard documentation for information on the logic used. If you are writing a custom text control (whether in Xaml or not) you will need to make sure it supports the UI Automation TextPattern and ValuePatterns and focus changed events.

    You link the sample which demonstrates this. While it implements the automation providers on a Xaml control, the concepts are the same. You will need to provide an AutomationPeer which supports the ITextProvider and IValueProvider.

    For an more on writing an automatable control see the UI Automation Provider Programmer's Guide


    Monday, August 13, 2012 9:26 PM