Windows Phone 8.1 New features-control's app bar

Source: Internet
Author: User


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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.