类型“NavigationWindow”;不支持直接内容
我正在尝试使用 NavigationWindow 类而不是 Window 来允许 WPF 应用程序中的窗口之间进行导航。但是,当在 XAML 中向 NavigationWindow 添加内容时,出现错误: “‘NavigationWindow’类型不支持直接内容”。我怎样才能克服这个问题?
I am trying to use NavigationWindow class instead of Window to allow navigation between windows in WPF application. But when adding content to the NavigationWindow in XAML, I am getting an error:
"The type 'NavigationWindow' does not support direct content". How can I overcome this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法向导航窗口添加任何内容。
它只是页面将要运行的“窗口”,因此您必须告诉页面将要初始运行的导航窗口,您可以通过使用“Source”来做到这一点
像这样:
请参阅此处的教程:
http://windowsclient.net/learn/video.aspx?v=4190
You can't add any content to a NavigationWindow.
It is just a "Window" where the Page is going to run, so you have to tell the NavigationWindow wich Page it is going to initial run, you do that by using "Source"
Like this:
See a tutorial here:
http://windowsclient.net/learn/video.aspx?v=4190