简体   繁体   中英

HubPage and CommandBar control in Windows Phone 8.1 App

I would like to try build my first WP8.1 app and I have a problem with CommandBar in Hub. I want to add different bar to all HubSections but I don't know how to do this :/ I tried to use SectionsInView ( like here ) but the change of CommandBar items is sooooo slow.

The second question is how can I make transparent CommandBar in HubSection? HubSection contains ListView. Now, when I try to do this, ListView bottom margin is changing and I don't see ListView under CommandBar (I don't know why...). Look at picture .

The third question is how can I change AppBarButton color when I'm pressing it?

Answer 1. You can try to create a new AppBar programmatically in the xaml.cs .

Answer 2. You can change the transparency for your AppBar . You'll also have to do this programmatically. Choose the control that you want the AppBars transparency to change with, select which event you wan't the AppBars transparency to change with. (Make sure you have given you AppBar a name).

Then type this in the following line:

BottomBar.Background = new SolidColorBrush(Color.FromArgb(50, 24, 68, 120));

Make sure you change the value for the option A , from 0-100. This option will decide what transperency you will have. The other options like R , G % B will decide what color the AppBar will have.

Answer 3. It's not really possible, the buttons highlight relies on your devices Accent Color . Therefore it takes a lot of programming to change that one little action.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM