Windows Phone 8.1 was released at the Microsoft Build 2014 conference on April 3, 2014. Compared to Windows Phone 8, it has changed a lot, both from the user and the developer's point of view. Next we will use several articles to understand the impact of these changes on the developer and how we can better utilize the new features of WP8.1. The biggest change in WP8.1 is the combination with the Windows Store App, which we collectively refer to as Windows RunTime apps. The controls in WP8.1 are located under the Windows.UI.XAML.Controls namespace, which is consistent with the Windows Store app. Let us first introduce the new control for the first WP8.1: the Application Bar Application Bar Presumably everyone is not unfamiliar, it has a very important application in the WP8, we also call it applicationbar. ApplicationBar can add buttons and menu items, let's take a look at the simple implementation code: |
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar>
<shell:ApplicationBar.Buttons>
<shell:ApplicationBarIconButton Text="Btn1" IconUri="***.png"/>
<shell:ApplicationBarIconButton Text="Btn2" IconUri="***.png">
</shell:ApplicationBar.Buttons>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="Menu Item 1"/>
<shell:ApplicationBarMenuItem Text="Menu Item 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
In this example, ApplicationBar contains two buttons and two menu items. Let's look at how to implement the Application bar in WP8.1:
In the Windows Store app, the application bar is divided into two types, Topappbar and Bottomappbar, which are used for the top navigation bar and the bottom command bar, respectively. And in the WP8.1 only Bottomappbar, it plays the role and WP8 in the ApplicationBar is the same. Bottomappbar can contain CommandBar, while CommandBar can use two command elements, the main command element and the secondary command element. Both of these elements work similarly to buttons and menu items in WP8. Take a look at the code:
Detailed Description: http://wp.662p.com/thread-8188-1-1.html
Windows Phone 8.1 New features-control's app bar