gpt4 book ai didi

windows-phone-7 - Windows Phone 7 从应用程序导航到 Internet

转载 作者:行者123 更新时间:2023-12-03 13:45:12 25 4
gpt4 key购买 nike

我有以下问题:
我有我的 Windows Phone 7 应用程序,我有一个 HyperlinkButtonNavigateUri绑定(bind)到 Uri像这样创建:

Uri uri = new Uri("http://google/ro",UriKind.Ablosute)

但是当我按下按钮时,出现以下错误:

Navigation is only supported to relative URIs that are fragments, or begin with '/', or which contain ';component/'.\r\nParameter name: uri



我做错什么了?或者是不允许使用 HyperlinkButton 的应用程序上网的 WP7 ?自从我创建像 Uri uri = new Uri("/Page.xaml",UriKind.Relative) 这样的 uri它会将我重定向到 Page.xaml在项目中。

最佳答案

我发现了一个相当奇怪的解决方法来解决这个问题。只需将 TargetName="_blank"属性添加到您的 HyperlinkBut​​ton 控件,它就会神奇地开始工作。

<HyperlinkButton Content="Google" NavigateUri="http://google.com" TargetName="_blank" />

克里斯

关于windows-phone-7 - Windows Phone 7 从应用程序导航到 Internet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4510689/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com