You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The process to create an Item is a bit complex, since it needs two icons (one filled for when it's selected, and one outlined for when it's unselected) and a text under the selection border.
I've opted for the content to only be the text part, while the icons get set trough a style property, like this:
To set the NavigationRail in "Icon only mode" you can use the property: <Setter Property="materialDesign:ListBoxItemAssist.IsTextVisible" Value="False"/>
The sample is under NavigationRail page in MaterialDesign3Demo app.
Conclusion
So I'm waiting for feedback before cleaning up and in case making a Pull Request.
Also I'm not sure about the new Material Design 3 structure, for now the styles are in the standard MaterialDesignTheme.ListBox.xaml file. If it should go somewhere else, please let me know.
The style should go into MaterialDesign3.ListBox.xaml (you can see f.e. MaterialDesign3.TextBox,xaml already added).
As for the the icons in the ListBoxItem, it's a bit hairy but maybe we can have a better iteration in the future, I'm thinking maybe a custom control, but I don't know what @Keboo 's opinion is about this.
Activity
[-]Update to MaterialDesign 3 ListBox[/-][+]NavigationRail for MaterialDesign3 ListBox[/+]MichelMichels commentedon Mar 22, 2022
This is nice work!
The style should go into MaterialDesign3.ListBox.xaml (you can see f.e. MaterialDesign3.TextBox,xaml already added).
As for the the icons in the ListBoxItem, it's a bit hairy but maybe we can have a better iteration in the future, I'm thinking maybe a custom control, but I don't know what @Keboo 's opinion is about this.