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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
BackButtonTitlewill be changed toCurrentPageTitleto 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, settingCurrentPageTitleto "Test123" on Page A'sCommandBarthen 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
NavigationCommandProperty and rename it toNavigationButton. TheCommandBarRenderers (iOS/Android) will read theIconandForegroundproperties of theAppBarButtonand map to the native properties of the native back button.AppBarButtonboolstringstringNavigationButton'sIconandForegroundproperties will be used to set the icon and colour of the native back button. The native back button will be completely replaced with thisAppBarButtonifIsNavigationButtonAttachedistrue.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
NavigationCommandbehaviour the same, except for its name which will change toNavigationButton. Along with theNavigationButton, we will add a newAppBarButtoncalledBackButtonthat will consolidation the currentBackButtonIconandBackButtonForegroundAppBarButtonAppBarButtonstringstringBackButton'sIconandForegroundproperties 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