Skip to content

Add NavigationListBox Style#2335

Merged
Keboo merged 6 commits intoMaterialDesignInXAML:masterfrom
StefanoRivolta-Previero:NavigationListBox
Jun 2, 2021
Merged

Add NavigationListBox Style#2335
Keboo merged 6 commits intoMaterialDesignInXAML:masterfrom
StefanoRivolta-Previero:NavigationListBox

Conversation

@StefanoRivolta-Previero
Copy link
Copy Markdown
Contributor

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:
GBxm6Nfv6c

With custom colors:
bssnLx5nTz

MaterialDesignNavigationPrimaryListBox Dark:
lIhckT0N5I

MaterialDesignNavigationPrimaryListBox Light:
wnVkwXcLXQ

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

MaterialDesignNavigationAccentListBox Dark:
ZctP1NfQoG

MaterialDesignNavigationAccentListBox Light:
wRiAxNX9w8

Copy link
Copy Markdown
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.

This looks like a great addition. Got a couple of questions before merging it.

PreviewMouseLeftButtonUp="UIElement_OnPreviewMouseLeftButtonUp"
AutomationProperties.Name="DemoPagesListBox">
AutomationProperties.Name="DemoPagesListBox"
Style="{StaticResource }">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you mean to include a style key here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, my fault, no idea what happened here :/

BorderThickness="{TemplateBinding BorderThickness}"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<ScaleTransform ScaleX="1"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this transform getting used by anything?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

@Keboo Keboo added this to the 4.2.0 milestone May 29, 2021
@Keboo Keboo added enhancement release notes Items are likely to be highlighted in the release notes. labels May 29, 2021
StefanoRivolta-Previero and others added 2 commits May 31, 2021 11:09
Removed transforms that where not used
@Keboo Keboo merged commit 53c050c into MaterialDesignInXAML:master Jun 2, 2021
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.

Add new ListBox style to make Navigation Bar like spec

2 participants