ButchersBoy / Dragablz

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

TabItem IsEnabled False #90

Open campersau opened 8 years ago

campersau commented 8 years ago

It looks like Dragablz does not support IsEnabled="False" on TabItem is that true?

<TabItem Header="Tab No. 2" IsEnabled="False">
    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">We Have Tearable Tabs!</TextBlock>
</TabItem>

Would it be possible to add this feature?

ButchersBoy commented 8 years ago

It doesn't really make sense to have a disabled tab...imagine you have two tabs, 1 disabled which you can't get at. If you drag the second tab out into another window then the disabled tab is still there, exposed.

Of course you can disable your content, but in the world of re-orderable, tearable tabs it doesn't make sense.

campersau commented 8 years ago

Yeah that is true.

I currently use dragablz because they include your material design theme but I don't use the re-orderable or tearable tabs and always set FixedHeaderCount so they pretty much behave like normal tabs. And for this use case it would make sense. But maybe this is not the main purpose of dragablz :smile:

djengineerllc commented 8 years ago

From the other issue about collapsing tab Visibility, you could implement the same logic as I just posted over there to perform your desired functionality of enable/disable.

Reference Issue: https://github.com/ButchersBoy/Dragablz/issues/91 Example code: http://pastebin.com/rBxX7jxa

slimshader commented 5 years ago

Bumping up this issue. I am using Dragablz because of Material Design integration and would really like to be able to disable tabs based on (binded) settings. All works on with TabControl but is fugly :(