I can give a workground here, maybe it's a little bit duffer, but it can solve your problem.
Since CommandBar in Page.BottomAppBar
will not be hinden when the software keyboard is visible, but it overlaps the SplitView Pane, we can keep the CommandBar
in the Content of Grid
, but make a copy of this CommandBar
and put it into the Page.BottomAppBar
, in the meanwhile make it collapsed at first, for example like this:
<Page.BottomAppBar>
<CommandBar x:Name="AppCommandBarCopy" Visibility="Collapsed">
<CommandBar.PrimaryCommands>
<AppBarButton Name="SaveCopy"
Icon="Save"
Label="Save"></AppBarButton>
<AppBarButton Name="ClearCopy"
Icon="ClearSelection"
Label="Clear"></AppBarButton>
</CommandBar.PrimaryCommands>
</CommandBar>
</Page.BottomAppBar>
Then in the code behind, we can detect if the software keyboard is visible or not, if the keyboard is visible, show this copy; if not, hide this copy, for example here:
public SplitViewCommandBarKeyboard()
{
this.InitializeComponent();
InputPane.GetForCurrentView().Showing += OnKeyboardShowing;
InputPane.GetForCurrentView().Hiding += OnKeyboardHidding;
}
private void OnKeyboardHidding(InputPane sender, InputPaneVisibilityEventArgs args)
{
AppCommandBarCopy.Visibility = Visibility.Collapsed;
}
private void OnKeyboardShowing(InputPane sender, InputPaneVisibilityEventArgs args)
{
AppCommandBarCopy.Visibility = Visibility.Visible;
}