开发者

Display a WPF window inside another

开发者 https://www.devze.com 2022-12-31 11:33 出处:网络
Before pointing me to Have a wpf window inside another wpf window or telling me that MDI is soooo 1995, let me explain my application.

Before pointing me to Have a wpf window inside another wpf window or telling me that MDI is soooo 1995, let me explain my application.

I'm creating a MessageBanner window that works similar to the message banner we see in several sites nowadays (including SO)

I want client code to call my message banner using four different modes:

MessageBanner.Show(content);
MessageBanner.Show(content, ownerWindow);
MessageBanner.ShowModal(content);
MessageBanner.ShowModal(content, ownerWindow);

I believe you got the application.

The thing is that when ownerWindow is displayed, I want to display my MessageBanner window inside the ownerWin开发者_运维问答dow.

Any ideas on how to do it?


I'm not sure why you want to add it as a Window. It sounds to me like you'd want to create it as an adorner rather than a window.

0

精彩评论

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

关注公众号