开发者

How to Open modal window/dialog in XBAP Application?

In WPF, if i want to open a modal/response window then i write code like

Window1 _windowObj1 = new Window1(); _windowObj1.Owner = mainWindowObject; _window1Obj.ShowDialog();

How to do the same in XBAP. I tried it, but the window is opened independently f开发者_运维知识库rom the parent page as i cant assign it as a Owner of modal window.

How to Open modal window/dialog in XBAP Application?


I'm not really experienced with XBAP apps, but I believe you should try displaying "popups" in an adorner layer. This has the same effect (you can't access the rest of the application), but doesn't actually open another window according to windows. Google for "wpf adorner dialog" and you should get some results.

Here are some links:

How do I make modal dialog for a Page in my WPF-application?

http://www.codeproject.com/KB/silverlight/slmodal.aspx

http://www.codeproject.com/KB/WPF/wpfmodaldialog.aspx


You did implement Window of WPF? If so, it will not work in XBAP. Please host your UserControl to Windows.Form, then you can open modal window/dialog in XBAP Application

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜