Before opening:
If you are interested in Windows 8.1 related AppBar and CommandBar controls, it is highly recommended that Wang Lei's blog Park
Link: Re-imagine Windows 8.1 Store Apps (72)-New controls: AppBar, CommandBar
And not know the name of the blogger to WP8.1 in AppBar elaborated an article: Http://www.dotblogs.com.tw/eternaltung/archive/2014/05/07/wpappbar.aspx
OK, here's the Windows Phone8.1, and after looking at the above two-bit article, list my sentiment:
WP8.1 only Bottomappbar, no topappbar. Because in terms of human experience and aesthetics, the design of AppBar to the mobile phone to the top is not human.
The CommandBar control has several useful and confusing properties
1.ClosedDisplayMode
When set to minimal, the AppBar is hidden to the minimum, and the compact will appbar normal display as shown:
2.PrimaryCommands and Secondarycommands Properties
Two properties in Windows 8.1 are literally meaning, one after the other, from left to right
In Windows Phone 8.1, the former is still sorted from left to right, and the latter is not a continuation of the arrangement, but instead becomes the form of a MenuItem list, such as the difference:
<span style= "font-size:18px;" ><Page.BottomAppBar> <commandbar x:name= "Commonbar" issticky= "True" closeddisplaymode= "Compact" > <appbartogglebutton icon= "like" label= "like"/> <appbartogglebutton icon= "dislike" label= "Disli Ke "/> <appbarbutton icon=" library "label=" library "/> <appbarbutton icon=" Stop "label=" St Op "/> <!--above is not written in Commandbar.primarycommands, but is automatically added by default--<commandbar.secondarycommands > <appbarbutton icon= "like" label= "like"/> <appbarbutton icon= "dislike" label= "D Islike "/> <appbarbutton icon=" library "label=" library "/> <appbarbutton icon=" Sto P "label=" Stop "/> </CommandBar.SecondaryCommands> </CommandBar> </page.bottomappbar ></span>
3.IsSticky and IsOpen Properties
Please refer to the explanation given in Microsoft MSDN in this section, very detailed.
Link: AppBar Class
IsOpen property: Gets or sets a value indicating whether AppBar is visible
Issticky property: Gets or sets a value indicating whether AppBar is not closed when the light dissipates
By default, the application bar closes when the user interacts with your application anywhere outside the application bar. This is called light dissipation . To Mission
Make visible, you can change the close by setting the Issticky property to True
Mode. When the application bar is a note and is closed only when the user right-clicks, presses WINDOWS+Z, or clicks from the top or bottom of the screen
Onclosed method: Called when AppBar changes from visible to hidden
Onopened method: Invoked when the AppBar changes from hidden to visible, or is first displayed
Closed event: Occurs when AppBar changes from visible to hidden
Opened event: Occurs when AppBar changes from hidden to visible
CommandBar in Windows Phone8.1