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

[Material] Default NavigationBar's MainCommand with a PathIcon for a back arrow #1227

Closed
kazo0 opened this issue Aug 21, 2024 · 1 comment · Fixed by #1228
Closed

[Material] Default NavigationBar's MainCommand with a PathIcon for a back arrow #1227

kazo0 opened this issue Aug 21, 2024 · 1 comment · Fixed by #1228

Comments

@kazo0
Copy link
Contributor

kazo0 commented Aug 21, 2024

The Material styles for the NavigationBar should utilize a PathIcon with a back arrow icon as the default MainCommand for all platforms except for mobile.

NOTE: We CANNOT use the Icon Setter on the MainCommandStyle, the PathIcon MUST be declared directly in the ControlTemplate, the same way it is done for NavigationView in Fluent here:

See how in NavigationView's template it uses a Button with a specific style: https://github.com/unoplatform/uno/blob/6bb40b428855f8b36e3fb1fea937f054d88ae620/src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/NavigationView.xaml#L646

And the Style uses a hardcoded icon in the template:
https://github.com/unoplatform/uno/blob/6bb40b428855f8b36e3fb1fea937f054d88ae620/src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/NavigationBackButton.xaml#L67-L75

We should have a specific MaterialMainCommandStyle that re-templates the MaterialAppBarButtonStyle and uses a hardcoded PathIcon as the content

@kazo0 kazo0 added kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification. control/navigationbar theme/material and removed triage/untriaged Indicates an issue requires triaging or verification. labels Aug 21, 2024
@kazo0
Copy link
Contributor Author

kazo0 commented Aug 21, 2024

I think we can do something like highjack the Content property and allow people to set it as the Path Data, that way we can have multiple MainCommandStyles like the default one with a Back arrow and another like a CloseMainCommandStyle or something that sets the data to a X icon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants