Function description
Developers who have used Lumia phones are familiar with the built-in camera features. In the Lumia built-in camera feature, the user changes the photo parameters, changes the movie parameters ... And so on the setting function, are as indicated: After selecting the ApplicationBar option, display the Settings menu on the same page to provide the user set parameters. And so, after selecting the ApplicationBar option, the function of displaying the menu on the same page, I gave it a name called: "applicationmenu".
- function Screen <ignore_js_op>
Using Applicationmenu to interact with the user, with the advantages and disadvantages listed in the following table, developers can evaluate and choose according to the system requirements. At present, the. NET framework does not provide built-in applicationmenu, and developers must do it themselves. This article describes how to do applicationmenu, to display a menu on the same page after selecting the options for ApplicationBar, and to leave a record for yourself to help developers in need.
- Advantages
- When switching pages, the user waits for the new page to wait.
- Reduce the user's fear of learning new pages after switching pages.
- When writing a program, developers are designed to function like state maintenance, parameter passing, state recovery, and so on.
- ......
- Disadvantages
- Page selection slip long, increase the user's learning burden.
- Adding a menu to the page means that the page function is increased and the memory is added to the execution.
- Adding a menu to the page means that the page responsibilities are increased and the complexity of the maintenance is increased.
- ......
function use
Before we begin to explain how to do Applicationmenu, we first show you how to use Applicationmenu, so that developers can not see a lot of real program code directly unconscious. The applicationmenu of this article is ultimately the extension of encapsulating functionality into the popup category:
- Applicationmenuextensionpublic static class applicationmenuextension{//Methods public static void Sh Owapplicationmenu (This popup popup) {//...} public static void Hideapplicationmenu (This popup popup) {//...}}
To add Applicationmenu to the page, developers need to define a popup category as Applicationmenu in the XAML of the page first, and the ApplicationBar category used to open the Applicationmenu:
- ApplicationBar
- Applicationmenu
Then only in the event handler of the page, call Showapplicationmenu, hideapplicationmenu the two popup category extension method, you can display in the page, hide the Applicationmenu:
- Mainpagepublic partial class mainpage:phoneapplicationpage{//Handlers private void Beginsettingbutton_click (Obje CT sender, EventArgs e) {//Show this. Settingmenu001.showapplicationmenu (); private void Endsettingbutton_click (object sender, EventArgs e) {//Hide this. Settingmenu001.hideapplicationmenu (); }}
- Execution results
- Detailed Description: http://wp.662p.com/thread-8109-1-1.html
WP uses APPLICATIONMENU to interact with users