私は、1 つの ListPage と ReportsPage の別の BottomAppBar に対して xaml で BottomAppBar を宣言しています。アプリを再開すると BottomAppBar が消えることがあり、MessageDialog コントロールを使用して ListPage から ReportsPage に移動しているときに消えることがよくあります。
リストページ:
<Page.BottomAppBar>
<CommandBar x:Name="bottomApplicationBar" Loaded="FrameworkElement_OnLoaded">
<AppBarButton x:Name="AddAppBarButton" IsEnabled="True" Label="{Binding [select_button], Source={StaticResource LocalizedStrings}}" Icon="Edit" />
<AppBarButton x:Name="RefreshAppBarButton" IsEnabled="True" Label="{Binding [refresh_button],Source={StaticResource LocalizedStrings}}" Icon="Refresh" />
<AppBarButton IsEnabled="False" x:Name="SetTripTypeBarButton" Label="{Binding [triplist_bulkedit_set_trip_class], Source={StaticResource LocalizedStrings}}" Visibility="Collapsed" Flyout="{StaticResource TripTypeFlyout}">
<AppBarButton.Icon>
<FontIcon Glyph="T" FontWeight="Bold"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton IsEnabled="False" x:Name="SetTripPurposeBarButton" Label="{Binding [triplist_bulkedit_set_purpose], Source={StaticResource LocalizedStrings}}" Visibility="Collapsed" >
<AppBarButton.Icon>
<FontIcon Glyph="P" FontWeight="Bold"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton IsEnabled="False" x:Name="DeleteAppBarItem" Label="{Binding [triplist_bulkedit_delete], Source={StaticResource LocalizedStrings}}" Icon="Delete" ></AppBarButton>
<CommandBar.SecondaryCommands>
<AppBarButton Visibility="Collapsed" x:Name="allTripsButton" Label="{Binding [triplist_bulkedit_all_trips],Source={StaticResource LocalizedStrings}}" Icon="Font" />
<AppBarButton Visibility="Collapsed" x:Name="allTripsPurposeButton" Label="{Binding [triplist_bulkedit_missing_purpose], Source={StaticResource LocalizedStrings}}" />
<AppBarButton Visibility="Collapsed" x:Name="allTripsFromReportButton" Label="{Binding [triplist_bulkedit_all_trips],Source={StaticResource LocalizedStrings}}" />
</CommandBar.SecondaryCommands>
</CommandBar>
</Page.BottomAppBar>
レポートページ:
<Page.BottomAppBar>
<CommandBar x:Name="submitAppBar" IsOpen="True" >
<CommandBar.PrimaryCommands>
<AppBarButton x:Name="submitReportAppBarButton" Label="{Binding [report_submission_submit_button], Source={StaticResource LocalizedStrings}}" Click="SubmitReportAppBarButton_OnClick" Icon="Accept" IsEnabled="False" />
</CommandBar.PrimaryCommands>
</CommandBar>
</Page.BottomAppBar>