WP7 TextBox focus problem when WebBrowser exists - windows-phone-7

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).

Related

xamarin forms UWP tablet app windows 10 clicking on 2nd textbox closes keyboard

We are doing User acceptance testing on a Xamarin Forms UWP app targeting windows 10 tablet. We are finding that when the user clicks on a textbox to enter data the soft keyboard appears as expected. However, when the user then clicks into the next textbox to enter a second required piece of data, the soft keyboard hides/closes. This results in the user having to double hit the second textbox (and any more than might need to be filled). The first click hides the keyboard, the second then causes the keyboard to reappear. To say the least this is not a good user experience. I'm guessing maybe the focus of the second is firing before the lost focus of the first? Has anyone else observed this behavior and is there any easy fix? As may want to target both Android and Windows I'm hoping for a simple solution but maybe UWP just does has some problems?

Controls randomly not showing in my VB6 software

I have a VB6 application with a lot of controls (sometimes even reaching the maximum set by VB6 for a form, we then create custom control to bypass this limit).
On some PC, some buttons/combobox/checkbox disappear. They appear when you click where they actually are and still fire the events, but until the click you're just not able to see it. It's just 1 or 2 controls of the form, everything else is behaving like it should.
It appears on some PC, not all, and the "hidden" controls are not the same from PC to PC (and the majority of the PC the soft runs on have no problem at all).
The Visible property is of course set to true. I can't even reproduce the problem at will...
Do you have any idea of what can cause that? Thank you.

Windows Phone (7+8) how to get a Popup Flyout style?

I've seen a Windows Phone 7 app with a window/popup which shows, after a use choice, half covering the current window, sliding in from the left while it closes when the users taps outside that window. For Windows 8x Store apps, this is a PopUp Control in a Flyout. But this is not available for Windows Phone.The regular pop-up control doesn't slide in with
<toolkit:TransitionService.NavigationInTransition>
which does work in a page-to-page transition. I have not succeeded either in closing it when I tap outside the pop-up. I tried adding LostFocus="MyEndPopUp" but that method is never called and also tried to end it on a OnNavigateFrom. What do I miss here?
If anyone could e.g. point me to some sample code doing more or less what I want would be great.

open browser, full screen, with on screen keyboard at startup, not closable

I need that one of our computers, when it boots, automatically opens Internet Explorer. IE should be Full screen (without the border and the address bar.. totally full screen) and open a default URL (no problem on this, just set it as homepage). Then I would need that if a textbox inside this page gets focus then the on-screen keyboard should show up.
can this be achived with standard windows settings or do i have to write my own program with browser inside? if i write my own vb.net program, can the program be totally fullscreen (without the X to close and without seeing the task bar)
what we need to do is set up a sort of a internet station where random people can browse a given page without having a keyboard and without having the possibility to access the system.
thanks
I would say it is possible - but I have no idea how to achieve this. There will be a registry setting of some sort which SHOULD enable the keyboard. Sorry - I barely touched this areas :(

Detect that the onscreen keyboard has been displayed on Windows Phone 7

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.

Resources