Suppose I have a TabControl
with some TabItem
s, 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?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.