Is there a way to override the behavior of the back button in the browser when using a Silverlight app?
Essentially what I want to do is use the browser's back button to close dialogs in my application. The dialog covers the whole screen and the user would be inclined to think they are on a separate web page.
Look to the following links:
Prevent Browser Back Button for Silverlight with Confirm Dialog.
Silverlight - Prevent users from losing changes by using the browser back button
Managing Silverlight 3 navigation
behavior
Related
I am needing to use the DotNetBrowserControl inside of another application (I am an add-in in the application). The application is written in WPF and has some WinForms components.
When I try to use the WPFBrowserView in the app I can never get focus to go into the Browser Window at all (even when clicking on a the google search box for example).
When I try to use the WinformsBrowserView inside of a WindowsFormsHost control I am able to get focus into the google search box by clicking on it. However once I click focus out of the browser control (to a WPF textbox for example) I can never get Keyboard focus back into the browser (even when clicking on a textbox in the browser).
It seams I am closest on getting the WInformsBrowserView working. Does anyone have any advice on how to force focus into the browser window? Even if I could programmatically force this to happen it would be a huge help.
We have implemented force focus feature for DotNetBrowser, but it is not yet present in the current version. We plan to add it to the next version of DotNetBrowser. If you need a build with this feature present, please get in touch with us via DotNetBrowser support email, and we will provide you with a preview build.
I have a WPF application that hosts a CEF browser using CEFSharp. I've found that if I navigate my application's controls using keyboard tabbing, I can cycle through my controls without problem. Once focus makes it to the ChromiumWebBrowser control, focus shifts to within the current web page, as expected. However, once focus makes it within the web page, I can never get focus back out to my application. Hitting tab at the end of the html document just moves focus back to the top of the page, rather than pushing focus back to my application.
I have tried implementing IFocusHandler, but IFocusHandler.OnSetFocus() gets called right when the application is launched and none of the handler methods ever get called again.
How can I move focus back to the host application when tabbing reaches the end of a document in CEFSharp?
UPDATE:
Since this is a bug in CEF that has yet to be fixed, here are a couple relevant links to check on later to see if any progress has been made.
CEFSharp issue: https://github.com/cefsharp/CefSharp/issues/721
CEF issue: https://bitbucket.org/chromiumembedded/cef/issues/1826/focus-handler-not-called-for-offscreen
I'm using the Navigational Framework in Silverlight 4. I'm starting to believe that this was a mistake as the browser buttons are really screwing things up for users. For instance, when a child window is opened the user believes they can close the window by pressing the back button. It doesn't close the window obviously, it just navigates the parent page back a step. The end result is a messed up data set. I'm fed up with the little control I have over the navigation of my application; forward and back buttons are anachronistic. Web applications don't work that way anymore. Please someone tell me how I can disable their functionality; that is, cancel navigation when it is started from one of these buttons.
Remove this code from your html page which holds your silverlight XAP:
<iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
This is the history frame.
You will likely have to do this in the actual web/asp.net page, as Silverlight has no real control over the browser.
Some workarounds in this article:
http://lennilobel.wordpress.com/2009/07/26/defeat-the-evil-back-button-in-your-asp-net-applications/
Is there any way to load my silverlight app in F11 mode directly?
I have used
window.open(url, '_self',
'toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=no,fullscreen=yes',
'true');
HtmlPage.window.invoke("launchPage",url);
But the problem is that two instances of my app are opened. One in normal screen and the other in fullscreen.
I have tried
App.Current.Host.Content.IsFullScreen = true;
in the constructor of the App.xaml
Still its not working. :(
Where am I going wrong??
running a Silverlight application automatically in full-screen is not possible because of security restriction. It is like the following...
You have opened your banks login page in a Firefox tab. This is your current tab.
You are opening a malicious silverlight application on another tab.
The malicious silverlight application loads and creates a full-screen that exactly matches your bank's login page.
You are talking to someone while the silverlight application loads. (Your eye is not on screen) So you missed the fullscreen message that pops up.
Now when you look at the computer screen you see your bank login page that is actually a fullscreen page of the silverlight application that matches your bank's login page.
You enter your user name and password...and
When you click login the malicious application has got everything it wanted.
This is not only for Silverlight. It is a restriction that SHOULD BE THERE WITH EVERY ACTIVEX CONTROL UNTIL THIS PROBLEM IS SOLVED.
What you are doing with javascript is you are opening a new pop up window without menubar, addressbar etc. It is not a replacement of F11. And to my experience most of the users hate automatic poping up. And most modern browsers will block them anyway.
The best way is to tell the user she needs to view your application on fullscreen and LET HER DECIDE INSTEAD OF FORCING IT.
i have a web page that has to go dim on page load and some box comes over.
the box has to have a TextBox. this box takes some input from the user. and on click
on a submit button the TextBox info is to be checked on server and then accordingly the
already dimmed web page may go normal(usable) or keep dimmed.
very much like what happens on opening the home page of www.sulekha.com
please guide me on this.
thankQ
have you tried using the ChildWindow in the Silverlight Toolkit, does that not give you the intended "modal" + "grey out background" behaviour
http://silverlight.codeplex.com/wikipage?title=Silverlight%20Toolkit%20Overview%20Part%204
Sample here:
http://silverlight.net/content/samples/sl3/toolkitcontrolsamples/run/default.html