Closed kazo0 closed 1 month ago
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
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