Markus Rudel
Markus Rudel

Reputation: 1318

Missing App Bar Template in Visual Studio 2012 Express for Windows Phone 8

according to this MSDN article, there should be an Application Bar template in every generated Xaml File for Windows Phone Projects:

Locate the sample Application Bar element, which is added to your page by default. It looks like the following.

I've created a new empty Windows Phone 8 project in Visual Studio 2012 and I'm missing the App Bar template which was visible when I developed for Windows Phone 7. Is this only deactivated or do I need to copy and paste the code snippet for the creation of an App Bar when I'm developing Windows Phone 8 projects?

Upvotes: 0

Views: 1194

Answers (1)

Markus Rudel
Markus Rudel

Reputation: 1318

I've found no other solution than to copy and paste the XAML code into my WP8 projects like this (code taken from this page):

<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar Opacity="1" IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBar.Buttons>
               <shell:ApplicationBarIconButton IconUri="/Images/appbar.add.rest.png"
Text="add">
               </shell:ApplicationBarIconButton>          


<shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png"
Text="save">
               </shell:ApplicationBarIconButton>
               <shell:ApplicationBarIconButton IconUri="/Images/appbar.delete.rest.png"
Text="delete">
               </shell:ApplicationBarIconButton>
            </shell:ApplicationBar.Buttons>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Menu Item 1" IsEnabled="True">
                </shell:ApplicationBarMenuItem>
                <shell:ApplicationBarMenuItem Text="Menu Item 2" IsEnabled="True">
                </shell:ApplicationBarMenuItem>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>    

Microsoft encourages users to use the localizable ApplicationBar instead it seems.

Upvotes: 0

Related Questions