Is there a way to deactivate phone7 keyboard in my project when Textbox gets focus ?
you can hide the keyboard by moving the focus away from the keyboard by calling
this.hide();
however this does give a flicker.. alternative is to set your textbox to be readonly. I haven't tried this approach yet
Related
I will be developing a JavaFX app for Windows 10. Does anyone know whether a JavaFX TextField on focus can trigger Windows 10 to show up its on screen keyboard?
Your experience is much appreciated!
JavaFX knows how to notify the on-screen touch keyboard HOWEVER we did not find a way to open a specific keyboard type according to the textfield value type.
Other than that assume that the keyboard will always hide the buttom 1/3 part of your app - so that IF you need that real-estate to be active when user types input in - it can't be done.
we are only able to use default layout - see Touch keyboard index on https://msdn.microsoft.com/en-us/library/windows/apps/mt280229.aspx
A follow up on changing they keyboard layout is here:Set numeric layout for windows onscreen keyboard programmatically
In my Windows Phone 7 Silverlight application I have my own custom keypad that I want to use instead of the standard soft keyboard. The problem that I have is that I have not found a way to completely disable or prevent the SIP/Soft Keyboard for my application or for the TextBox component.
Is it possible to disable the soft input keyboard in my application?
Is it possible to prevent the soft input keyboard from popping up when a TextBox get focus?
Can I extend or override any functions in TextBox to make it behave the way I want?
I’ve seen solutions how to hide the keyboard when a certain key is entered by moving focus off the TextBox but I want to prevent it from ever showing up.
My problem is very similar to what's stated on How do I prevent the software keyboard from popping up? and How to prevent keyboard to show in EditText onTouch? but for Windows Phone 7 instead.
I am fully aware that some may think it is stupid to use your own keypad instead of the standard input but I have my reasons for doing it this way and I just want to know if it is possible to achieve what's described.
If you don't want to use the SIP, you don't need a TextBox.
Use a TextBlock and bind it to the input generated by the custom buttons.
Have a look at this blog post http://www.silverlightshow.net/items/Windows-Phone-7-Creating-Custom-Keyboard.aspx
Peter, consider using THIS, with customizations. I'm working in a project where we use a custom keyboard. With some extra codes and customizations I've made a custom softkeyboard, as you can see in the screenshot bellow. Right now, my softkeyboard is working properly, but with some issues to be resolved yet.
My custom WP keyboard problems are:
There's no caret cursor;
The TextBox in my screen is a AutoCompleteBox, and when it opens the completions, my keyboard loses focus, and so I need an extra tap (this is my greates problem now)
WP native keyboard try to slide up when I choose an item within the completions
IsHitTestVisble =false solve your issue
I ran into a strange issue concerning the usage of the WebBrowser control in windows phone applications. The thing is when you use WebBrowser control it "steals" the focus and prevents setting it to any other control until a user input occurs. The WebBrowser itself doesn't even have to be on the same page as the textbox.
Consider a scenario:
Create an empty application.
Put a WebBrowser and a TextBox on your main page (rootvisual).
Now in the page loaded event (or anywhere else) try to set the focus on the textbox tbx.Focus();
The textbox will theoretically have the focus, the SIP (software keyboard) will slide up ... but the textbox will lack a cursor and you won't be able to type anything.
The same thing happens if you put the textbox on a different page and navigate to it with the appbar without touching anything else after the app starts.
The FocusManager.GetFocusedElement() shows that our textbox indeed has the focus.
How to fix this issue? Very annoying :)
Btw. the problem exists on:
- devices running version 7.0.7004.0 (before NoDo, initial release?)
- devices running NoDo
The problem does NOT exist on:
- devices running Mango
- emulator (7.1 designed for Mango)
Thx for any help.
This is a known problem, and as far as I know there is no way around it, although I've tried (setting focus in a timer, etc).
How do I programmatically close the onscreen keyboard for my WP7 app?
The only way would be to change the focus to be away from the TextBox that's causing it to be open, with .Focus on some other control. You can put it on a non visual control if you prefer.
If you're on a page that has no other sensible control to switch focus to, setting IsEnabled = false (and then back to true straight away if you want) on the TextBox which has focus will also close the SIP.
http://www.geekchamp.com/tips/how-to-hide-the-soft-keyboard-in-a-windows-phone-app
You will love this, It solved my problem when search clicked
Simple question:
How do I detect that the onscreen keyboard has been displayed on windows mobile 7? Is there an event I can add a listener to?
It takes up about half the screen and I want to scroll the view up when it gets displayed...
EDIT:
A comment below indicates more clearly what I'm trying to do: I have a textbox input, and as the user types into it an autocomplete dropdown appears below it (like google suggest). By default, the active control (the textbox) scrolls into view when focussed, and the onscreen keyboard is directly below it. The onscreen keyboard appears in front of my autocomplete dropdown - what I want to do is make the screen scroll a little further up, so there's some room for my dropdown to be shown.
The windows phone UI design guidelines say: "When the keyboard is deployed, the application should scroll to ensure the active edit control and the caret are in view". This happens fine, it's just the non-active dropdown gets hidden behind the onscreen keyboard.
The guidelines also say that an application can choose to show the onscreen keyboard, and can also choose to close it.
At the moment i'm stuck, and I don't think (based on my research and the replies to this question) that it's possible to detect that the onscreen keyboard has been displayed. I'm moving my investigation to see if it's possible to determine the "visible area" of the page (width & height in pixels for example), and combine this with an onfocus for the textbox... not sure if this will prove fruitful though.
Detecting when the virtual keyboard is displayed won't be possible in 7.0, as confirmed by Microsoft's Peter Torr in the WP7 forum on MSDN.
Maybe, as a dirty workaround, you could detect when the position of your text box (or its parent scroll viewer's offset) has changed, as this would indicate that the virtual keyboard has appeared or disappeared.
You can listen to the TextBox.GotFocus and TextBox.LostFocus events to detect when a text box in your application acquires and looses focus.
If an editable element gets focus then the framework will automatically scroll the element into view. So you really shouldn't have to do anything.