First click doesn't work after navigating to a page - silverlight

I have a Silverlight application that is using the Navigation Framework. The page is never focused right after it is navigated too. So when I first click on a button, it does nothing (except focus the page). Only the second click after navigation works. I use a subclass of the Page and have hooked the GotFocus event. It is never called. I've also tried to call the Focus method a handler for the Loaded event and the override to OnNavigatedTo. Nothing works. The GotFocus handler is never called until I actually click somewhere in the view. My clients are not going to accept this. Is this a bug with the Navigation Framework, is there a work around?
Thanks for you help.

Related

Web Page Refreshing on keyboard pop

I have implemented a login page in React and Material UI. When using in mobile, on certain phones the page refreshes automatically as soon as focus from one textfield goes away, and in another scenario, as soon as the keyboard pops up it refreshes. Anyone who has faced a similar issue, or any clue why this could be happening.
I tried calling the preventDefault method for onBlur event, but no change. Couldn't think of anything else, since observed the issue on some devices and not on others

Tab select event is triggered when I am navigating away

I am using the Tab directive and the select expression to trigger a method when the tab is loaded. But the event is also triggered when I am navigating away from the site. How can I avoid this?
I have created a small example on github.
https://github.com/mkeuschn/management-reporting
Behaviour:
When I use the Report link the tab event of the first tab is fired. OK
If I am navigating away from the report part (press the home button), then the event of the second tab is fired. NOK
regards,
Marko
Update
I have created a plunk: http://plnkr.co/edit/7NQwVGa7tpBDNRbIckZk?p=preview
Github Issue
https://github.com/angular-ui/bootstrap/issues/2155
I had the same problem with Angular-UI v0.11.2. After checking out related issue on github, i saw that it is fixed and merged into master branch.
I applied this patch and it worked as expected.

Panningmode on scrollviewer causes wierd focus issue on ShowDialog

I have a WPF application with some content wrapped in a scrollviewer. I also have a custom dialogbox, which basically is a light customized Window I call ShowDialog() upon.
I can use this just fine on both PC and Tablet.
But now I´ve added the PanningMode attribute to the scrollviewer, so the Tablet users can scroll/swipe with their finger, and now the problem occurs: when I use my dialogbox it shows up, but it seems like it doesent have focus. Because the first time I click on a button in the dialogbox, nothing happens. I have to click twice before the button click is registered.
If I remove the panningmode attribute on the scrollviewer, the problem is gone.
This is only a problem on the Tablet, not on the PC.
Any clues?
I found the problem.
I was triggering the dialogbox in mousedown on an image. Tried several events, but the StylusUp did the trick.

Reacting to StylusDown in control's UI?

I'm building a touch screen application in WPF and I'm wanting to show a change in UI when the user presses a button with their finger/stylus. Currently you only get a flicker of UI change once the finger is released but nothing before that.
I've been trying to hook up triggers and/or eventtriggers in the button template to things like stylusdown and touchdown but to no avail.
I've hooked up some console writes on events attached to a button and they appear in the following order:
StylusDown
StylusButtonDown
TouchDown
StylusUp
StylusButtonUp
Click
All of which firing at the same time when the finger is lifted from the screen. (TouchUp doesn't seem to fire at all).
Any ideas on how I could begin to capture a finger pressing onto a button in the template so I can give the user some idea that they are actually pressing a button?
After blogging in more detail about this issue I had a comment recommending using a SurfaceWindow and then SurfaceButtons from the Surface Toolkit (currently in Beta) and now all is working as I would expect.
Update: The link is now dead. Here's the link to that page from Wayback Machine.

Silverlight webbrowser control

Is there a way to fire an event when the user clicks on link on a web page. I looked at all the events available for the webbrowser control and the only one I saw was the LoadCompleted event. But this event fires after a page has been loaded. I need to fire an event right before a page is loaded.
Without some co-operating javascript in the web page there is no way to acheive this.
If the web page(s) being displayed are something you control you can add some javascript to the page like this:-
window.external.notify("Page is doing xyz");
you can then use the controls ScriptNotify event to retrieve the string sent by the notify.
You could add such script in the web page onunload event or the onclick event of an anchor, etc.

Resources