WPF:提升页面模式的弹出窗口的最佳方法? [英] WPF: Best way to raise a popup window that is modal to the page?

查看:22
本文介绍了WPF:提升页面模式的弹出窗口的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用导航样式页面而不是 Windows 构建 WPF 应用程序.我想在一个页面内显示一个窗口,这个窗口必须是该页面的模态窗口,但允许用户转到其他页面,并返回与模态窗口处于相同状态的同一页面.

I am building a WPF app using navigation style pages and not windows. I want to show a window inside a page, this window must be modal to the page, but allow the user to go to other page, and go back to the same page with the modal window in the same state.

我尝试过使用 WPF 弹出控件,但问题是每次您离开页面时控件都会隐藏.我想我可以编写代码再次显示它,但接缝方式不正确.

I have tried with the WPF popup control but the problem is that the control hides everytime you navigate away from the page. I guess that I can write the code to show it again, but does not seams the right way.

在 WPF 中执行此操作的最佳方法是什么?

What is the best way to do this in WPF?

推荐答案

这个 StackOverflow 答案 可以帮助您.我创建了一些其他用户要求的示例代码.我已将此添加到博客文章 这里.

This StackOverflow answer may help you on your way. I created some sample code that some other users have asked for. I have added this to a blog post here.

希望这会有所帮助!

这篇关于WPF:提升页面模式的弹出窗口的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆