Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting a tabitem to a window

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?

like image 646
FPGA Avatar asked May 26 '26 21:05

FPGA


1 Answers

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.

like image 173
Danny Varod Avatar answered May 28 '26 11:05

Danny Varod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!