首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Windows Phone HyperlinkButton导航移植到Windows 8 HyperlinkButton导航

将Windows Phone HyperlinkButton导航移植到Windows 8 HyperlinkButton导航
EN

Stack Overflow用户
提问于 2014-01-05 09:12:46
回答 1查看 445关注 0票数 0

我正在将我的一个Windows Phone 8应用程序移植到Windows 8,但我遇到了导航问题。

Windows Phone 8 C#:

代码语言:javascript
复制
HyperlinkButton flcb_standard = new HyperlinkButton();
flcb_standard.NavigateUri = new Uri("/player.xaml?publishingpoint=http://mlmidev.webcastcenter.com/flcb_1/idev.isml/manifest", UriKind.Relative);

Windows 8 C#:

代码语言:javascript
复制
this.Frame.Navigate(typeof(player), publishingpoint);

我可以用Click=""将控件绑定到适当的命令。问题是我正在使用C#创建控件,但我还没有找到可以将this.Frame.*设置为的属性。

如何使用新的Windows 8导航方法执行此导航?

EN

回答 1

Stack Overflow用户

发布于 2014-01-26 08:58:34

好吧,我不确定这是不是最好的方法。不过,它确实起作用了。

c#:

代码语言:javascript
复制
// set outside of the other two functions so it will be global
string publishingpoint_sunday = "";

public async void Rebroadcast()
{
    publishingpoint_sunday = rootObject.sunday_publishingpoint_smoothstreaming;

    HyperlinkButton sunday_title = new HyperlinkButton();
    sunday_title.Content = "Sunday (" + sunday.ToUpper() + ")";
    sunday_title.Click += sunday_link_Click;
}

private void sunday_link_Click(object sender, RoutedEventArgs e)
{
    this.Frame.Navigate(typeof(Player), publishingpoint_sunday);
}

所以,现在你就知道了。全新的Windows 8导航样式。对我来说,这似乎是不必要的复杂。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20928858

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档