Replies: 3 comments 7 replies
-
Based on https://platform.uno/docs/articles/controls/CommandBar.html#appbarbutton, we are only allowing |
Beta Was this translation helpful? Give feedback.
0 replies
-
What's the motivation for creating this new control, versus continuing to have this functionality in CommandBar? |
Beta Was this translation helpful? Give feedback.
6 replies
-
In this revision:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We need a control that, on iOS and Android, will hook into the Android Toolbar and iOS UINavigationBar and provide a way to customize the native navigation bar. On other platforms, this control will simply be a façade for the
CommandBar
. The logic to forward DependencyProperties to the native Toolbar/UINavigationBar already exists as part of theCommandBarRenderer
for iOS and Android. This logic will be imported to the Toolkit and will be renamed toNavigationBarRenderer
. Below is the proposed contract for this new NavigationBar control. The properties outlined here will replace the current Extensions that are being used as part of theCommandBar
as well as having similar DependencyProperties to those ofCommandBar
, which will be forwarded to the innerCommandBar
that theNavigationBar
is composed of.AppBarButton
NavigationButtonMode
NavigationButtonMode.Native
string
IObservableVector<AppBarButton>
IObservableVector<AppBarButton>
object
We will apply the refactoring of the CommandBar Extensions from this discussion to the
NavigationBar
.On Android and iOS, the NavigationBar will not be rendered where it is placed in the XAML. It will serve as a placeholder from which to read the information we need to pass to the
NavigationBarRenderer
that will, in turn, setup the native Android Toolbar or iOS UINavigationBar. On other platforms, the default NavigationBar control template will simply contain aCommandBar
whose properties are template bound to the same properties on theCommandBar
. So, on platforms like WASM/Skia, thePrimaryCommands
,SecondaryCommands
,Content
, etc. will be forwarded to the innerCommandBar
Beta Was this translation helpful? Give feedback.
All reactions