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

Tab control extended #2544

Merged
merged 14 commits into from
Dec 30, 2021

Conversation

MichelMichels
Copy link
Member

@MichelMichels MichelMichels commented Dec 26, 2021

I extended the work of ahmed-abdelrazek (#2542).

It fixes following things:

  • Foreground color of context inside TabItem

  • Better UI on the demo page

  • Replaced the default TabItem style with the compact one, removing the compact style in the process

  • Adding a shadow per Material spec guidelines

  • Removed the SmallCaps property for TabItem headers

  • WIP: TopIcon implementation

  • WIP: making the control independent of ColorZone

@MichelMichels
Copy link
Member Author

image

@MichelMichels
Copy link
Member Author

I'd like to implement following style as default:
image

I think the ColorZone controls inside the template will have to be converted to Borders. It would be a bit easier removing the whole ColorZoneAssist setup and replacing with static style more like the Button control (f.e. MaterialDesignRaisedLightButton -> MaterialDesignLightTabControl).

Thoughts?

@ahmed-abdelrazek
Copy link
Contributor

i don't think removing ColorZoneAssist will make it easier if anything it will make it more difficult for developers to customize their tabs (just one line for a lot of options), the Button control should make more used of ColorZoneAssist
maybe it would viable after the new brushes releases #2435

@MichelMichels
Copy link
Member Author

I'm almost there. I'm trying to find an easy and extensible way to create filled or custom styles atm

image

@MichelMichels
Copy link
Member Author

image
image
image
image

@MichelMichels
Copy link
Member Author

This fixes #1616

@ahmed-abdelrazek
Copy link
Contributor

great work so far, thank you

@Keboo Keboo added this to the 4.4.0 milestone Dec 28, 2021
@Keboo Keboo added enhancement release notes Items are likely to be highlighted in the release notes. labels Dec 28, 2021
@MichelMichels
Copy link
Member Author

I will be checking some placement bugs in coming days.

Copy link
Member

@Keboo Keboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really nice. Let me know when it is ready to merge.

MainDemo.Wpf/Domain/MainWindowViewModel.cs Outdated Show resolved Hide resolved

namespace MaterialDesignThemes.Wpf
{
public static class TabItemAssist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this being used anywhere?
I can see the Leading/Top icon in the demo but I would expect that if someone wanted that look, they would simply put a StackPanel inside of the TabItem.Header and setup the layout that way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't be used. I commited this a bit too soon, I'll remove the class in a following commit.

I was thinking this could be a preferred way of doing this, analogous with how Button has a LeadingIcon.

@MichelMichels
Copy link
Member Author

It should be done now. See screenshots below.

image

image

@Keboo Keboo merged commit 73187ef into MaterialDesignInXAML:master Dec 30, 2021
@MichelMichels MichelMichels deleted the TabControl-extended branch January 2, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement release notes Items are likely to be highlighted in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants