我正在将我的一个Windows Phone 8应用程序移植到Windows 8,但我遇到了导航问题。
Windows Phone 8 C#:
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#:
this.Frame.Navigate(typeof(player), publishingpoint);我可以用Click=""将控件绑定到适当的命令。问题是我正在使用C#创建控件,但我还没有找到可以将this.Frame.*设置为的属性。
如何使用新的Windows 8导航方法执行此导航?
发布于 2014-01-26 08:58:34
好吧,我不确定这是不是最好的方法。不过,它确实起作用了。
c#:
// 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导航样式。对我来说,这似乎是不必要的复杂。
https://stackoverflow.com/questions/20928858
复制相似问题