I tried to create shell with Page.BottomAppBar. The result is the bar is visible but content of the MainPage is not, only black screen is shown.
public override Task OnInitializeAsync(IActivatedEventArgs args)
{
Window.Current.Content = new Views.ShellNavBar();
return Task.CompletedTask;
}
This is ShellNavBar Page:
<Page
/.../
<Page.BottomAppBar>
<CommandBar>
<AppBarSeparator/>
<AppBarButton Icon="Add" Label="Add" Click="AppBarAddButton_Click" />
<AppBarButton Icon="Home" Label="Home" Click="AppBarHomeButton_Click" />
<CommandBar.Content>
<TextBlock x:Name="HeadText" Text="PlaceHolder" Margin="12,14"/>
</CommandBar.Content>
</CommandBar>
</Page.BottomAppBar>
</Page>
Can someone guide me where I am doing mistake?
Well, I added your code to the template to see if it would work and it did. Doesn't even occlude any of the Hamburger Menu. I am not sure what the problem you have is, I think you might have a typo or something because your approach is fine.
Here's my app.xaml.cs code:
Thanks for using Template 10.