Detach Tab like in Visual Studio 2010

Topics: Prism v4 - WPF 4
Feb 15, 2012 at 8:16 PM

Hi everyone

I have Shell window with a tabcontrol as a main region. But I need to be able to detach the tabs an make them another window, containing the TabItem in the new window.

For practicity, all my TabItems are simple UserControl with a property named ViewName (which is used as a tab header).


Or rethinking the question:


How can I create a new window and move my UserControl to that window (respecting PRISM and MVVM)?


Hope anybody could help me with this

Feb 16, 2012 at 4:22 PM

I think I figured it out.


Using the PopupwindowBehavior and the drag event on the tab item.


But if somebody have a better way to do it, be my guest

Feb 17, 2012 at 12:19 PM
Edited Feb 17, 2012 at 12:19 PM


Based on my understanding of your scenario,I agree a PopupwindowBehavior like  the RegionPopupBehaviors in the StockTrader Reference Implementation seems to be a suitable way to achieve this. You can find there is an implementation of RegionPopUpBehavior (one for Silverligth and other for WPF). The main difference between these two implementations is the control that they are displaying.


Agustin Adami

Feb 17, 2012 at 4:49 PM

Tnx for the suggest. That's what Im trying to achieve.

But Im facing a problem right now:


Another of my requirements is to implement a sort of modal window on top of the shell. (you know, the ones that dim the background).

Im trying to implement a new ModalPopupDialogActivation and a new ModalPopupWrapper.


Inside this one, Im trying to use the WPFToolkit Extended's Child Window, but for no reason Im able to make it work.


IS there another fancy-pants way to achieve this?


Feb 17, 2012 at 4:54 PM

I think I figured it out... The visual tree... need to add the childwindow into it....