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