Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
How does this relate with #6195 ? Honestly, the WinUI CommandBar code is what is needed most. When this comes in, the existing (highly restrictive) CommandBar should likely be removed. The CommandBar implementation currently in Uno is likely best left to platform-specific code in my opinion. It functions like a MAUI wrapped control and isn't suited to the design objectives of Uno (pixel-perfect, WinUI compatible). I expect Uno uses this implementation a lot internally so it could be pulled out into a separate control and left in. I just think it shouldn't be the default CommandBar implementation. It seems to create many more problems than it solves for those of us with existing code. |
Beta Was this translation helpful? Give feedback.
-
The CommandBar Extensions need to be cleaned up and some can be merged under better defined contracts like an AppBarButton. Below is a proposal of the new Attached Properties and some notes on how they would be implemented.
The naming of the
BackButtonTitle
will be changed toCurrentPageTitle
to better reflect its actual behaviour. This property relates to the title of the back button on the next page in the stack on iOS. So, settingCurrentPageTitle
to "Test123" on Page A'sCommandBar
then forward-navigating to Page B from Page A will now set the back button's title to "Test123", indicating that you would be navigation back to a page titled "Test123" (Page A).Option 1
We will consolidate most of the properties into the
NavigationCommand
Property and rename it toNavigationButton
. TheCommandBarRenderer
s (iOS/Android) will read theIcon
andForeground
properties of theAppBarButton
and map to the native properties of the native back button.AppBarButton
bool
string
string
NavigationButton
'sIcon
andForeground
properties will be used to set the icon and colour of the native back button. The native back button will be completely replaced with thisAppBarButton
ifIsNavigationButtonAttached
istrue
.IsNavigationButtonAttached
: Determines whether or not the AppBarButton is actually attached to the native CommandBar. This will replace the native back button and disabled the native back gesture.CurrentPageTitle
(iOS Only): Value to be used by the back button of the next pageSubtitle
(Android Only): The subtitle is displayed below the native title. The colour of the subtitle can't be changed.Option 2
We will keep the
NavigationCommand
behaviour the same, except for its name which will change toNavigationButton
. Along with theNavigationButton
, we will add a newAppBarButton
calledBackButton
that will consolidation the currentBackButtonIcon
andBackButtonForeground
AppBarButton
AppBarButton
string
string
BackButton
'sIcon
andForeground
properties will be used to set the icon and colour of the native back buttonCurrentPageTitle
(iOS Only): Value to be used by the back button of the next pageSubtitle
(Android Only): The subtitle is displayed below the native title. The colour of the subtitle can't be changed.Beta Was this translation helpful? Give feedback.
All reactions