locked
Keep Inputpane/Keyboard open when showing AppBar RRS feed

  • Question

  • I would like to Keep the InputPane open when the AppBar is showing.

    The Metro Mail App can do this: When editing a new mail and the InputPane is open and you swipe in the AppBar then the InputPane stays open.

    How can i achieve this?

    Friday, August 3, 2012 8:26 AM

Answers

  • Hi Strentler,

    The touch keyboard will show when a control with the UI Automation TextPattern or TextChildPattern patterns has focus. It will close when the focus moves to most controls that don't have that (for more details see the Touch Keyboard/Invocation and dismissal logic .

    If you run inspect from the SDK ("\Program Files (x86)\Windows Kits\8.0\bin\x64\inspect.exe") and watch the focus when using the Mail app you will see that when the AppBar is shown the focus is set to the "Save Draft" button. Examining this in inspect, this button supports "TextChildPattern", so the touch keyboard doesn't dismiss.

    To do the same in your app you would need to subclass your button control to provide these interfaces yourself.

    --Rob

    Saturday, August 4, 2012 12:04 AM
    Moderator

All replies

  • Hi Strentler,

    The touch keyboard will show when a control with the UI Automation TextPattern or TextChildPattern patterns has focus. It will close when the focus moves to most controls that don't have that (for more details see the Touch Keyboard/Invocation and dismissal logic .

    If you run inspect from the SDK ("\Program Files (x86)\Windows Kits\8.0\bin\x64\inspect.exe") and watch the focus when using the Mail app you will see that when the AppBar is shown the focus is set to the "Save Draft" button. Examining this in inspect, this button supports "TextChildPattern", so the touch keyboard doesn't dismiss.

    To do the same in your app you would need to subclass your button control to provide these interfaces yourself.

    --Rob

    Saturday, August 4, 2012 12:04 AM
    Moderator
  • This no longer appears to be valid information.

    Although the Mail application's buttons are indeed supporting the TextChildPattern,  standard buttons do not implement TextChildPattern. 

    In addition, it is apparently not enough to just implement a custom control, and custom AutomationPeer which implements ITextChildProvider.

    After creating a custom class which subclasses button, and (seemingly) properly implementing the ITextChildProvider interface in an AutomationPeer which subclasses ButtonAutomationPeer, it seems that the touch keyboard will still be dismissed.

    I've done the same with the AppBar, with no changes in behavior. inspect.exe shows both the AppBar and the buttons as IsTextChildPatternAvailable = true.

    What could I possibly be doing wrong?

    Saturday, December 29, 2012 5:36 AM