在默认Web浏览器中打开URL。 Windows Phone 8.0应用程序

时间:2015-11-03 10:17:40

标签: c# windows-phone-8 windows-phone-8.1

我在Text块中有一个超链接。我希望它在网络浏览器中打开链接,但是当我点击它时,我得到一个弹出窗口

  

"在商店中搜索应用"

我的应用程序崩溃了......

我的XAML代码是:

extract($_POST);

if(isset($_FILES['images']['name']))
{
    $file_name_all="";
    for($i=0; $i<count($_FILES['images']['name']); $i++) 
    {
        $tmpFilePath = $_FILES['images']['tmp_name'][$i];    
        if ($tmpFilePath != "")
        {    
           $path = "photos/"; // create folder 
           $name = $_FILES['images']['name'][$i];
           $size = $_FILES['images']['size'][$i];

           list($txt, $ext) = explode(".", $name);
           $file= time().substr(str_replace(" ", "_", $txt), 0);
           $info = pathinfo($file);
           $filename = $file.".".$ext;
           if(move_uploaded_file($_FILES['images']['tmp_name'][$i], $path.$filename)) 
           { 
              $file_name_all.=$filename."*";
           }
       }
       $file="photos/" . $filename ;
       mysql_query("insert into gallery(image) values('".$file."')") or die(mysql_error());  
    }
}
else
{
    $filepath="";
}

if($query)
{
   header("Location: admin_profile.php");
}

我的CS代码是:

<TextBlock HorizontalAlignment="Right" Height="49" Margin="0,0,10,0" TextWrapping="Wrap" Width="326" Foreground="Black" FontSize="16">
                    <TextBlock.Inlines>
                        <Hyperlink Click="Hyperlink_Click" NavigateUri="www.bing.com">
                            <Hyperlink.Foreground>
                                <ImageBrush Stretch="Fill" ImageSource="Assets/Proceed.png"/>
                            </Hyperlink.Foreground>Don't have a Selfcare Account ? Register here.</Hyperlink>
                    </TextBlock.Inlines>
                    <!--<Hyperlink xml:space="preserve" Foreground="#000" FontSize="16">Don't have a Mobitel Selfacre Account ? Register here. </Hyperlink>-->
                </TextBlock>

请帮我解决一下......感谢任何帮助......

1 个答案:

答案 0 :(得分:1)

将uri从www.bing.com更改为http://www.bing.com。它需要协议来确定用于启动URL的应用程序。

检查这些链接以获取更多信息:

相关问题