Open ghost opened 3 years ago
TabGroup is a very interesting, more powerful generalization of these 'tabbing' concepts. You also may have solved some concerns with naming.
You don't explicitly state, but is your intention for this TabGroup proposal to supersede TabControl? The assumption is yes, but if you confirm I'll modify #4555 pointing directly here.
Edit: Also the control needs to support collapsed TabItems correctly like in WPF. In Pivot, for example, this was never supported correctly and leads to issues. This is the only thing missing from WPF I can think of at the moment.
@robloo yes, it was meant to have full parity with TabControl and be a direct replacement. I'll update this proposal to make things more clear.
By collapsed you mean hiding tabs entirely? It should already work normally with TabViewItem, which TabItem would be based on.
yes, it was meant to have full parity with TabControl
Thanks for confirming, I just wanted to be absolutely clear.
By collapsed you mean hiding tabs entirely? It should already work normally with TabViewItem, which TabItem would be based on.
Yes, as in you can bind visibility and dynamically show/hide tabs entirely. I know it seems obvious but Pivot doesn't support this (#2952) so I want to make it absolutely clear as a spec requirement.
Proposal: TabItem and TabGroup controls
Summary
I'm proposing new TabItem and TabGroup controls. They would basically be a lightweight, decoupled version of TabViewItem and TabStrip.
Rationale
Scope
Important Notes
TabItem
Ideally TabViewItem would be renamed into TabItem, because it's a more generic name. Alternatively TabViewItem could be wrapped around a TabItem, so that existing apps still work.
TabGroup
TabGroup would basically be a decoupled version of the TabView.TabStrip.
For v1, the controls would only support the minimal style.
The intention is to have them also used in TabView. The controls would have limited functionality by default, but TabView would retemplate them to add needed features (such as closing). Eventually, even NavigationView could use them.
For v2, the other styles and display modes can be added.
TabGroup should be able to completely replace the TabControl from WPF and Pivot.
This approach would allow TabView to get some functionality of NavigationView very easily:
Footer items
Grouping
Example usage
Creating a simple group:
If TabView would implement support for handling groups:
Open Questions
Are there other features missing from TabControl or from Pivot?