locked
Hide Surface RT virtual keyboard by programatically.

    Question

  • Hi,

    I want to hide Surface RT virtual keyboard by programatically, when I focus on the Dropdown or listview control, I dont want to display the keyboard, later when I focus on textbox, I want to display keyboard, I have solution for display a keyboard , but to hide I am not finding any solution or please let me know if this is not possible also.

    Thanks,

    Rajeev

    Thursday, August 15, 2013 6:33 PM

Answers

  • Hi Rajeev,

    Applications don't have direct control over the soft keyboard. It will show when a text control has focus and hide when one doesn't, unless the user has explicitly shown or hidden the keyboard. And you can read this article for more information: http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx

    Best Regards,

    --James

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Friday, August 16, 2013 9:12 AM
    Moderator
  • If a textbox gets focus via touch, the keyboard is automatically displayed. This is core system behavior. You can remove the focus from textbox by removing the focus from the textbox.

    /Morten
    twitter: http://www.twitter.com/dotMorten
    blog: http://www.sharpgis.net

    Sunday, August 18, 2013 5:10 AM

All replies

  • Hello Rajeev BR,

    Welcome to MSDN Forums.

    This forum is to discuss problems of CLR for .NET Framework.

    Your question is not related to the topic of this forum.

    I moved your thread to Windows Store apps forums for better response.

    Thanks for your understanding.


    Fred Bao
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, August 16, 2013 8:38 AM
  • Hi Rajeev,

    Applications don't have direct control over the soft keyboard. It will show when a text control has focus and hide when one doesn't, unless the user has explicitly shown or hidden the keyboard. And you can read this article for more information: http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx

    Best Regards,

    --James

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Friday, August 16, 2013 9:12 AM
    Moderator
  • If a textbox gets focus via touch, the keyboard is automatically displayed. This is core system behavior. You can remove the focus from textbox by removing the focus from the textbox.

    /Morten
    twitter: http://www.twitter.com/dotMorten
    blog: http://www.sharpgis.net

    Sunday, August 18, 2013 5:10 AM
  • You do not need to show or hide the keyboard yourself (unless you have some exceptional purpose).

    When the focus is on a control that requires/accepts text input the keyboard will be shown automatically by the OS* (e.g. when the user taps a textbox)

    When the focus is on something that does not require/accept text input the keyboard will not be shown/will be hidden if already on screen* (e.g. tapping a listview)

    * note - the OS will not display the on-screen keyboard on computers and tablets with a hardware keyboard. If you are building your app on a desktop PC (almost certain!) then you won't see the on-screen keyboard when testing. Get hold of a tablet to test the functionality. There may be a way to force the simulator to display the touch keyboard, but I don't know for sure.


    I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.

    Sunday, August 18, 2013 6:19 AM
  • You do not need to* note - the OS will not display the on-screen keyboard on computers and tablets with a hardware keyboard.

    This is not true. I have a hardware keyboard and touch. What determines if the display shows is whether you use touch to set focus on the textbox. The moment you start typing on the hardware keyboard it would go away again though.

    /Morten
    twitter: http://www.twitter.com/dotMorten
    blog: http://www.sharpgis.net

    Sunday, August 18, 2013 4:43 PM