Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Enable Tab visibility toggle #47

Closed
nielscup opened this issue Apr 23, 2019 · 7 comments

Comments

@nielscup
Copy link

commented Apr 23, 2019

Is your feature request related to a problem? Please describe.
Binding UnderlinedTabItem visibility property results in the tabItem being hidden when false, but leaves an unused space visible.

Describe the solution you'd like
If I set an UnderlinedTabItem.Isvisible to false I would like the remaining tabitems to fill the space.

Describe alternatives you've considered
Add tabItems in code

@nielscup

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Adding tabs in code doesn't work (so far): If I clear tabs and re-add them they are not connected to any view anymore.

@nielscup

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Reason: _tabs is not updated in OnChildRemoved.

So if I do TabViewHost.Children.Clear() and re-add my 3 tabs, there are 6 items in _tabs.

@roubachof roubachof changed the title Binding UnderlinedTabItem visibility results in the tabItem being hidden [Feature] Enable Tab visibility toggle May 16, 2019
@wint100

This comment has been minimized.

Copy link

commented Jun 23, 2019

Did you find a workaround for this, I'm having the same problem. When removing tabitems in code, the remaining tabs don't fill the boxview.

@roubachof

This comment has been minimized.

Copy link
Owner

commented Jul 2, 2019

there is no workaround, the implementation needs to be changed.
I will work on that during august

@roubachof roubachof added this to To do in Kanban board Jul 2, 2019
@jemunk

This comment has been minimized.

Copy link

commented Aug 29, 2019

Well, I think I have a workaround that seems to work. I have used it to hide a tab for a case.
For every TabItem added in XAML to the TabHostView view, a columndefinition having Width = Star is also added to the Grid that TabHostView is based on.
So If you get the columndefinition for the item to hide, then set Width to zero. Also to be sure that the tab is not accidentally activated, set its IsEnabled = false.

@roubachof

This comment has been minimized.

Copy link
Owner

commented Aug 29, 2019

I am actually working on this issue at this very moment :)
Soon you will have the choice between fixed tabs and scrollable tabs, and the IsVisible property will be fixed for any of the tab types.

@roubachof roubachof moved this from To do to In progress in Kanban board Sep 4, 2019
@roubachof roubachof moved this from In progress to Done in Kanban board Sep 4, 2019
@roubachof

This comment has been minimized.

Copy link
Owner

commented Sep 24, 2019

fixed in v1.3.0

@roubachof roubachof closed this Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4 participants
You can’t perform that action at this time.