Browser.HtmlPage.Window.Navigate is blocked, but HyperlinkButton is not - why?

I have a specific user interface element which, when clicked, should go to a different URL. I tried to handle the mouse down event and execute something like this: System.Windows.Browser.HtmlPage.Window.Navigate (new Uri ("http://google.com"), "_blank");

However, this is blocked by the browser (I tried both Chrome and Firefox) unless I disable the pop-up blocker. I have done some research, and it seems that the browser is blocking the navigation, which does not occur as a result of user interaction, and as for the browser, this navigation is initiated by the plugin (Silverlight), and not by the user.

OK, that makes sense. But then I tried using HyperlinkButton and was not blocked.

I wonder why these two approaches receive different calls from the browser. Any idea?

I really worked on the problem bypassing the navigational launch of the user interface using HyperLinkButton, but I'm still very curious ...

+5
source share
1 answer

I am going to pull out a fancy corporate quote and say, "This is a feature, not a mistake."

Silverlight . , haxorz, , - , , Zombo.com. ! Zombo!

: , HyperlinkButton . , , SecurityException, , - HyperlinkButton. .

: , - ?

"" . Microsoft Silverlight. XAML, -. .

UIElement. . , Visual Element - . Microsoft , /.

, , .

! , .

+4

All Articles