1
votes

I was trying to add App Bar in my Windows Phone Universal app. Here is the code that I have written on my Project:

<Page.BottomAppBar>
    <CommandBar>
        <AppBarButton Icon="Accept" Label="AppBarButton"/>
        <AppBarButton Icon="Cancel" Label="AppBarButton"/>
    </CommandBar>
</Page.BottomAppBar>

The App bar is showing properly in my Windows Phone and Windows Phone Emulator. But the problem that I faced is when I deployed the Windows version to the Local Machine and Simulator, there was no App Bar visible.

I have also tried the TopAppBar. The result was the same. Is there any way to add the App Bar which will work for both the Windows Phone and Local Machine?

Thanks in advance. :)

2

2 Answers

4
votes

In Windows Store App, the BottomAppBar and TopAppBar are hidden by default. When you Right-Click your mouse, or Swipe from bottom or top edge on your screen. The BottomAppBar or TopAppBar will appear.

You can see it in Adding app bars (XAML) MSDN

2
votes

You can set IsOpen property as True to show the app bar when the page loads.

<Page.BottomAppBar>
    <CommandBar IsOpen="True">
       <AppBarButton Icon="Accept" Label="AppBarButton"/>
       <AppBarButton Icon="Cancel" Label="AppBarButton"/>
   </CommandBar>
</Page.BottomAppBar>