-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Updated TabbedCommandBar for WinUI 2.6 #4132
Conversation
…s. WinUI See microsoft/microsoft-ui-xaml#3502 Also update TabbedCommandBarItem DataTemplate to use MUX version of NavigationViewItem
Thanks yoshiask for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Thanks @yoshiask! Will see if we can tweak the style bit a bit and slip this in the next preview. We can polish things up more before release. |
…uggestBox in TabbedCommandBar Note: Back Button doesn't actually show correctly still due to issue with Visual States that is unknown
We should investigate further better updates to the template in a redesign for the new design guidelines.
Fixed a couple of things, not perfect, but at least getting better. Still an issue with the inner button padding/sizes: I just adjusted the height of the TabbedCommandBarItem for now from 40 to 48 to at least fix the clip. Still issues with underlying Back Button behavior due to VSM not firing/setting BackButtonGroup state, no idea why that was happening as template parts for that were all the same. Flipped how that worked, so at least by default it doesn't have the gap, as we wouldn't normally expect back button to be used? Not sure why it works differently than Settings button which I turned off by default, but works fine when enabled. Add Theme Dictionary to better control contextual tab color, works for theme awareness now, but probably still needs better color values. Also added support quick for AutoSuggestBox 🙂 We can probably at least merge this in if we'd like for now, and then make another couple of fixes later or update more for the 2.6 style anyway. |
Realized VSM probably wasn't working properly as it's no longer in the root of the template as we have a Grid around the other grid. Tried to move it, but encountered an unknown crash in WinUI, filed an issue here: microsoft/microsoft-ui-xaml#5575 Also filed microsoft/microsoft-ui-xaml#5576 as wasted a lot of time debugging that problem yesterday and only thought about it's position this morning looking at it again. |
Hey! I updated us to the 2.6 style for CommandBar and it actually looks really slick!
Think this is all good to go for now, the Contextual Tab style could use a bit of work, but that's overall pretty minor. FYI @yoshiask, I've flipped this out of draft mode. @RosarioPulella @XAML-Knight this is good to review now! 🎉🎉🎉 |
@@ -36,8 +37,10 @@ public class TabbedCommandBar : NavigationView | |||
public TabbedCommandBar() | |||
{ | |||
DefaultStyleKey = typeof(TabbedCommandBar); | |||
DefaultStyleResourceUri = new System.Uri("ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/Themes/Generic.xaml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to remove the need for this line of code, but was unsuccessful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we had this same issue with ColorPicker
as well. We have an issue on WinUI for this here: microsoft/microsoft-ui-xaml#3502 - I suppose we could link to it, but I think we need it on all controls for WinUI 3, right @azchohfi?
Talked to @yoshiask, they're good with changes. So think we're good. |
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Fixes #4085
Previously,
TabbedCommandBar
used the system XAMLNavigationView
, but this doesn't work on WinUI 3. This PR makes the control functional on WinUI 2.6+ and 3.x, albeit with a few style issues (which will be fixed either in this PR or a later one).PR Type
What kind of change does this PR introduce?
Bugfix
Refactoring (no functional changes, no api changes)
What is the current behavior?
See #4085
What is the new behavior?
TabbedCommandBar
now inherits from MUXCNavigationView
and uses 2.6 stylesNormal*
andContextualTabTemplate
now use MUXCNavigationViewItem
PR Checklist
Please check if your PR fulfills the following requirements: