WP7 Application Development Notes (9) Application bar

Source: Internet
Author: User

You can use the Windows Phone SDK to quickly and easilyProgramIn the left-side navigation pane. The application bar is a line of icon buttons at the bottom of the mobile phone screen, which provides users with quick access to the most common tasks of the application.

The rendering modes include:

1. The simplest minimized is only shown below...

2 common:

3. Expand:

4. Expand + menu:

 

Application bar on the remote control interface

The first is the application bar of the remote control, because I usually need to operate the display in the simplest way, in order to unify the background color into transparent

In this way, you can expand only by clicking... on the right.

The "Settings" and "help" menus are displayed, and the background color is set to black.

You can achieve this by listening to the statechanged event of ApplicationBar,CodeAs follows:

Private VoidOnappbarstatechanged (ObjectSender, applicationbarstatechangedeventargs E)
{
ApplicationBar. backgroundcolor = E. ismenuvisible? Colors. Black: colors. transparent;
}

 

Set the application bar on the page

Generally, the setting interfaces are "save" and "cancel", because the "cancel" button is not recommended in Microsoft's design guidelines, which is implemented through the system's hind-leg key.

Here, we only need a "save ".

Saved Icons can be found in c: \ Program Files (x86) \ microsoft sdks \ Windows Phone \ v7.1 \ icons \ (32-bit system removed (x86 ))

Add appbar.save.rest.png to the project and set

<Shell: applicationbariconbutton iconuri = "/icons/appbar.save.rest.png" text = "save"/>

There is a very important issue to note: You must set the image generation attribute to content, otherwise it will not be displayed.

It is displayed as follows:

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.