从 Xbap 打开新页面
我们的应用程序是完全信任运行的 Xbap。 我有一个与此类似的功能:
private void ShowPage(Page page)
{
NavigationWindow mainWindow = Application.Current.MainWindow as NavigationWindow;
mainWindow.Navigate(page);
}
这对于在现有窗口内浏览非常有用。 我想在单独的窗口中打开这个新页面。 有办法做到这一点吗?
有一个重载需要“额外数据”,但我无法确定要传递什么来导航到新窗口。
Our application is an Xbap running in full trust. I have a function similar to this:
private void ShowPage(Page page)
{
NavigationWindow mainWindow = Application.Current.MainWindow as NavigationWindow;
mainWindow.Navigate(page);
}
This works great for browsing inside an existing window. I would like to open this new page in a separate window. Is there anyway to do this?
There is an overload that takes 'extraData' but I haven't been able to determine what to pass to navigate to a new window.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然 WPF 对于 StackOverflow 来说有点新鲜。 这是我想出的函数,以防其他人偶然发现这个。
我还没有在部分信任的情况下尝试过这个,很可能这只在完全信任的情况下有效。
Apparently WPF is a little new for StackOverflow. Here is the function I came up with in case anyone else stumbles across this.
I have not tried this in partial trust, it is likely this only works in full trust.
你是对的,这只适用于完全信任。 您无法在部分信任的情况下创建弹出窗口。
You are correct that this would only work in Full Trust. You cannot create a popup in partial trust.