Windows Phone 7 – Create an Application Bar

Posted: November 16, 2010 in Windows Phone 7 & Mango

Include the following namespace on the XAML page:

xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 

Now add the application bar as follows:

<phone:PhoneApplicationPage.ApplicationBar>
  <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
    <shell:ApplicationBarIconButton IconUri="/Images/icon1.png" Text="icon1" x:Name="appbar1" />
    <shell:ApplicationBarIconButton IconUri="/Images/icon2.png" Text="icon2" x:Name="appbar2" />
  </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

Only set the property IsMenuEnabled = True if you want to have a slide up menu option as well as appliaction icons.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s