Windows 8 application tool menu bar

Source: Internet
Author: User
Application Program This example shows how to use this application bar to present navigation, commands, tools, and users. The sample uses winjs. UI. And winjs. UI. Appbarcommand class. This application bar is default and appears on the edge of the screen that the user can finger from the top or bottom. The content it covers can be provided by the application and the user with a side brush, or the role of the application. Specifically, this shows how to add an application bar, customize the application bar, and control the application bar. This is simply written in HTML, CSS, and JavaScript. For the version of XAML, see the control example in The XAML application bar.

 

( Function (){
"Use strict ";
VaR Page = winjs. UI. pages. Define ("/html/scenario1.html ",{
Ready: Function (Element, options ){
Document. getelementbyid ("s10000add"). addeventlistener ("click", doclickadd, False );
Document. getelementbyid ("s1cmdremove"). addeventlistener ("click", doclickremove, False );
Document. getelementbyid ("s11_delete"). addeventlistener ("click", doclickdelete, False );
Document. getelementbyid ("s1w.camera"). addeventlistener ("click", doclickcamera, False );
Winjs. log & winjs. log ("to show the bar, swipe up from the bottom of the screen, right-click, or press Windows logo + Z. to dismiss the bar, tap in the application, swipe, right-click, or press Windows logo + Z again. "," sample "," status ");
},
Unload: Function (){
Appbarsampleutils. removeappbars ();
}
});

//Command button Functions
FunctionDoclickadd (){
Winjs. log & winjs. Log ("Add button pressed", "sample", "status ");
}

FunctionDoclickremove (){
Winjs. log & winjs. Log ("Remove button pressed", "sample", "status ");
}

FunctionDoclickdelete (){
Winjs. log & winjs. Log ("DELETE button pressed", "sample", "status ");
}

FunctionDoclickcamera (){
Winjs. log & winjs. Log ("camera button pressed", "sample", "status ");
}

})();

Complete instance

/files/risk/windows8/application tool menu bar sample.rar

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.