Silverlight HyperlinkButton DOES NOT work on EVERYTHING

I am trying to implement Siverlight HyperlinkButton as per this documentation :

<HyperlinkButton Content="Click here to learn about Silverlight"
                 NavigateUri="http://www.silverlight.net" 
                 TargetName="_blank" 
                 Margin="10,60,0,0"/>

But when I create and click on it, it shows nothing.

0
source share
2 answers

I assume that you did not enable external navigation for the Silverlight object. If you do not have a security exception, you will get a throw when you click on the link, but you can catch it without knowing it. This is described in the comments section of your link.

To enable navigation, change the Silveright host page (EG index.html) and add the following parameter to the Silverlight object

<param name="enableNavigation" value="true" />

Silverlight .html /, . , .html , , .html .

http://msdn.microsoft.com/en-us/library/dd833071(v=vs.95).aspx

Update:

Chrome, Firefox IE8. IE9. IE . IE8, IE9 Unauthorized Access.

# 2:

IE9, IE8. DOCTYPE . .

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head>
    <meta http-equiv="x-ua-compatible" content="IE=8">
    .
    .

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head>
    .
    .
+1

..... .....

<UserControl x:Class="HyperlinkButton2.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="300" Height="100">
    <Canvas x:Name="LayoutRoot" Background="White">
        <HyperlinkButton x:Name="hbtnTest" TargetName="_blank" Content="SilverlightShow" NavigateUri="http://www.silverlightshow.net" Canvas.Top="40" Canvas.Left="30"></HyperlinkButton>
    </Canvas>

HyperlinkButton Silverlight

0

All Articles