O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the ApplicationBar

Visual Studio provides you with a starting point by placing the markup for an ApplicationBar in a comment block when you create a new Windows Phone Portrait Page, a Windows Phone Landscape Page, and various Windows Phone projects using the Add New Item and New Project dialogs.

The ApplicationBar requires a namespace alias at the top of your page or control, as shown:

xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"

The markup for an ApplicationBar element is placed in the page’s phone:PhoneApplicationPage element. Placed within it are ApplicationBarIconButton elements and a MenuItems element containing ApplicationBarMenuItem, as shown in the following example:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required