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

查看:527
本文介绍了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?

推荐答案

此处的博客文章中添加了此内容.

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天全站免登陆