Add NavigationListBox Style#2335
Merged
Keboo merged 6 commits intoMaterialDesignInXAML:masterfrom Jun 2, 2021
StefanoRivolta-Previero:NavigationListBox
Merged
Add NavigationListBox Style#2335Keboo merged 6 commits intoMaterialDesignInXAML:masterfrom StefanoRivolta-Previero:NavigationListBox
Keboo merged 6 commits intoMaterialDesignInXAML:masterfrom
StefanoRivolta-Previero:NavigationListBox
Conversation
add a primary and accent variant for the NavigationListBox which respond to the change in theme
Keboo
reviewed
May 29, 2021
Member
Keboo
left a comment
There was a problem hiding this comment.
This looks like a great addition. Got a couple of questions before merging it.
MainDemo.Wpf/MainWindow.xaml
Outdated
| PreviewMouseLeftButtonUp="UIElement_OnPreviewMouseLeftButtonUp" | ||
| AutomationProperties.Name="DemoPagesListBox"> | ||
| AutomationProperties.Name="DemoPagesListBox" | ||
| Style="{StaticResource }"> |
Member
There was a problem hiding this comment.
Did you mean to include a style key here?
Contributor
Author
There was a problem hiding this comment.
Yeah, my fault, no idea what happened here :/
| BorderThickness="{TemplateBinding BorderThickness}" | ||
| RenderTransformOrigin="0.5,0.5"> | ||
| <Border.RenderTransform> | ||
| <ScaleTransform ScaleX="1"/> |
Member
There was a problem hiding this comment.
Is this transform getting used by anything?
Contributor
Author
There was a problem hiding this comment.
You're right, it's not used afaik, it's just that I copy-pasted MaterialDesignListBoxItem as the basis for the new Style, and that had the transform in the code. I'll remove it from both
Removed transforms that where not used
Keboo
approved these changes
Jun 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #2334
Adds three new styles for the listbox, so that it can resemble the spec when used in a Drawer as a NavigationBar.
The Primary and Accent variants are responsive to changes in the theme (dark-light).
The base variant can be used with custom colors.
All can have custom CornerRadius
MaterialDesignNavigationListBox:

With custom colors:

MaterialDesignNavigationPrimaryListBox Dark:

MaterialDesignNavigationPrimaryListBox Light:

MaterialDesignNavigationPrimaryListBox with custom CornerRadius, Margin, an Icon and a different PrimaryHue:

MaterialDesignNavigationAccentListBox Dark:

MaterialDesignNavigationAccentListBox Light:
