Show some view in tabs others in pop-up (modal)

Topics: Prism v4 - WPF 4
May 23, 2011 at 11:55 AM

Hi all

I tried searching for the solution to my requirement using various keywords but found none. My requirement is to be able to show some views in tabcontrol and others in modal windows. In my shell window, I could do only one thing at a time. All I want is that if some views could tell the shell to be added in the tab control region or shown as a model pop-up.

Thanks

Vijay

May 23, 2011 at 8:16 PM

Hi Vijay,

In the Stock Trader RI there is an implementation of a popup modal window, which could be suitable to fulfill the scenario you’re mentioning.

The Reference Implementation uses the RegionPopupBehavior for managing this and it is creating the WindowsDialogActivationBehavior. Therefore, you could to create your own implementation of DialogActivationBehavior for achieving your scenario, so that the window shown by the behavior is modal (for example, by calling the Window.ShowDialog method in the WindowWrapper.Show method inside the WindowWrapper.Desktop.cs file.

I hope you find this information useful.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

 

May 24, 2011 at 11:35 AM

Hi Miguel,

Thanks for your reply and it was a do'h moment for me as the example was right under my nose :). From now on, I will look for examples in the samples before I google.

Vijay