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

Proposal: Provide an additional TabView "skin" that is based on the WCT TabView #2587

Open
marcelwgn opened this issue Jun 2, 2020 · 18 comments
Assignees
Labels
area-TabView feature proposal New feature proposal team-Controls Issue for the Controls team wct

Comments

@marcelwgn
Copy link
Collaborator

marcelwgn commented Jun 2, 2020

Proposal: Provide an additional TabView "skin" that is based on the WCT look

Summary

A lot of people coming from the Windows Community Toolkit TabView prefer the look of the WCT TabView compared to the WinUI TabView. To make the switch to the WinUI TabView easier, we should have a WinUI TabView style which is based on the look of the WCT TabView.

Rationale

Since the WCT TabView is deprecated now, and will be removed at some point, people would either need to move the WinUI TabView despite prefering the WCT look or fork the WCT TabView and maintain it themselves. By providing a style that uses the WinUI TabView and looks like the WCT TabView, we would allow people to use the style they prefer.

This is also something some people already asked about (to some degree):
Request to have the WinUI TabView styled the same as the WCT
Wish to have Acrylic and Reveal in WinUI TabView

Important Notes

Possible API:

<!-- WinUI Fluent TabView -->
<muxc:TabView />

<!-- WinUI TabView with look based on WCT-->
<muxc:TabView Style="{StaticResource BoxTabViewStyle}" />

Comparison

WinUI TabView

gif

image

gif

image

WCT TabView

gif

image

gif

image

Open Questions

Where should this new style be hosted? Inside WinUI since it is a WinUI control or maybe somewhere else?

What should the new "skin" be called?

@marcelwgn marcelwgn added the feature proposal New feature proposal label Jun 2, 2020
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 2, 2020
@StephenLPeters
Copy link
Contributor

@chingucoding could you provide pictures as well?

@StephenLPeters StephenLPeters added area-TabView team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jun 2, 2020
@marcelwgn
Copy link
Collaborator Author

@chingucoding could you provide pictures as well?

Sure thing @StephenLPeters, I've updated the issue to include gifs and pictures showing both versions.

@mdtauk
Copy link
Contributor

mdtauk commented Jun 3, 2020

You say Skin, do you mean bundling a Style for the control in the WinUI toolkit that, when applied, will give it the WCT/Legacy Edge look?

Or do you see it as being a more fundamental property like TabVisual.WCT | TabVisual.Edge?

@ranjeshj
Copy link
Contributor

ranjeshj commented Jun 3, 2020

I would expect this be a named style as opposed to an API on TabView. @chigy Is there a precedent/pattern for providing multiple styles for the same control ?

@mdtauk
Copy link
Contributor

mdtauk commented Jun 3, 2020

I would expect this be a named style as opposed to an API on TabView. @chigy Is there a precedent/pattern for providing multiple styles for the same control ?

There is the AccentButton Style, as well as an Icon Button and Text Button

@marcelwgn
Copy link
Collaborator Author

Yes the idea is to provide a separate style for the WinUI TabView (as shown in the small example API snippet).

@mdtauk
Copy link
Contributor

mdtauk commented Jun 3, 2020

Yes the idea is to provide a separate style for the WinUI TabView (as shown in the small example API snippet).

Ok so ResourceDictionary then.

@stmoy
Copy link
Contributor

stmoy commented Jun 3, 2020

Ok so ResourceDictionary then.

I think it'd literally be a Style, similar to AccentButtonStyle.

@mdtauk

This comment has been minimized.

@stmoy
Copy link
Contributor

stmoy commented Jun 13, 2020

@mdtauk - thanks for the input on accent color, but I'm going to mark this particular thread as "off topic" since it isn't relevant to the proposal here about supporting a Windows Community Toolkit-style skin.

Note also that the TabView already does support accent color background as an app-provided choice, such as found in the Xaml Controls Gallery:
image

@marcelwgn
Copy link
Collaborator Author

marcelwgn commented Nov 23, 2020

While investigating this, I noticed an issue for this that is a complete show stopper: there is no way to override the default TabViewItem style. Unlike some other controls, the TabViewItem does not follow the pattern of:

<Style TargetType="ControlName" BasedOn="DefaultControlNameStyle"/>

<Style x:Key="DefaultControlNameStyle" TargetType="ControlName">
...
</Style>

but rather just exposes the complete template as the default style leaving users with no choice of easily overriding the default style. However that is something that we would need for this feature to be easily usable. @ranjeshj @stmoy @StephenLPeters Is that something we can change to make that customization easier?

@michael-hawker FYI

@huoyaoyuan
Copy link

How about a tab like skin for Pivot? Behavior of Pivot is closer to TabControl in WPF.

@marcelwgn
Copy link
Collaborator Author

The main point of this proposal is to make the migration from the WCT TabView to the WinUI easier for people who preferred the WCT look of TabView.

@huoyaoyuan
Copy link

make the migration from the WCT TabView to the WinUI

I did migration from WCT TabView to WinUI Pivot - I do need the pivot-like behavior instead of TabView. I remember that TabView didn't satisfy me.

@mdtauk
Copy link
Contributor

mdtauk commented Nov 24, 2020

make the migration from the WCT TabView to the WinUI

I did migration from WCT TabView to WinUI Pivot - I do need the pivot-like behavior instead of TabView. I remember that TabView didn't satisfy me.

No reason to not keep using the Pivot then

@marcelwgn
Copy link
Collaborator Author

If you need Pivot behavior, neither WCT TabView nor the WinUI TabView would be a good choice. WinUI TabView has replaced the WCT TabView and with feature parity of WinUI and WCT TabView, WCT TabView was deprecated. That's why I was proposing making that upgrade path easier.

@michael-hawker
Copy link
Collaborator

michael-hawker commented Dec 1, 2020

While investigating this, I noticed an issue for this that is a complete show stopper: there is no way to override the default TabViewItem style. Unlike some other controls, the TabViewItem does not follow the pattern...

Yeah, I've noticed this in a few places, I just called it out on the new Expander PR. There's a lot of general improvements to the templates that should be done for this across multiple controls in WinUI. Probably deserves its own general issue.

Edit: Filed #3735

@michael-hawker
Copy link
Collaborator

How about a tab like skin for Pivot? Behavior of Pivot is closer to TabControl in WPF.

Pivot was very much meant for touch-first experiences, it behaves oddly if you have scrolling content within it. It's not really like the TabControl in WPF at all. We had gone down the path at first of customizing Pivot to implement TabView in the Toolkit before we realized it should be its own control.

The new SwitchPresenter we're adding in the Toolkit should make basic scenarios work well (as we did for the new ColorPicker) if you don't need the swipe behavior and need heavy customization of a few static items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TabView feature proposal New feature proposal team-Controls Issue for the Controls team wct
Projects
None yet
Development

No branches or pull requests

8 participants