ButchersBoy / Dragablz

Dragable and tearable tab control for WPF
http://dragablz.net
MIT License
2.17k stars 321 forks source link

Window closes when the last Tab is closed #213

Open slow-down opened 5 years ago

slow-down commented 5 years ago

So say I have 3 tabs open right now and I close one after another. After closing all, I want to be able to still work with my window but it automatically closes... The tabs are not the only thing on my window. Is there a way to tell tabablz to not close the window when there are no tabs open? I need this as soon as possible, thanks 👍

slow-down commented 5 years ago

Anyone still active?? Please

ghost commented 5 years ago

i propose to create a class inherited from TabablzControl. next, add a function to close the tab and designate it for the close button in style

lanmanck commented 5 years ago

i propose to create a class inherited from TabablzControl. next, add a function to close the tab and designate it for the close button in style

could you post your code for learning? thank you.

ghost commented 5 years ago

i propose to create a class inherited from TabablzControl. next, add a function to close the tab and designate it for the close button in style

could you post your code for learning? thank you.

https://github.com/oneLab-Projects/Andromeda-Studio-old2/tree/dev/Andromeda-Studio/Data/Controls/TabControl see an example in my old project in the class you need to inherit the TabItem and set as a header a specially designed UserControl

th851dan commented 5 years ago

you just have to write a custom IntertabClient and set the TabEmptiedResponse to TabEmptiedResponse.DoNothing :)