Padu Merloti
Padu Merloti

Reputation: 3229

Display a WPF window inside another

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 ownerWindow.

Any ideas on how to do it?

Upvotes: 2

Views: 1039

Answers (1)

Jon Mitchell
Jon Mitchell

Reputation: 3429

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.

Upvotes: 1

Related Questions