Question

Suppose I have a TabControl with some TabItems, each tab Item contains a UserControl.

Is there a way to convert the TabItem to a window when its dragged outside the application window and vice versa?

Just like google chrome except that the window will only contain what was inside the TabItem.

Any ideas on how to achieve this?

Was it helpful?

Solution

If you are using an MVVM pattern, you should be able to do this:

When you drag the tab item out of the tab control, send a command to the VM to which creates a new window, passes the original datasource from the view (the tab item) to the window, then remove the tab item from its parent (the tab control) via a command to the parent VM.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top