0

How do I change the application bar from this application bar original

to be like this

application bar I want.

I already try code like this

<phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Minimized" BackgroundColor="#01A3BE"> <shell:ApplicationBarIconButton x:Name="About" Text="About" IsEnabled="True" Click="About_Click" IconUri="/Assets/AppBar/Icon Navigation.png"/> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar>

but the border still like picture number 1 with black border. And when I open Blend it just looks like application bar style can not be edited.

albilaga
  • 419
  • 1
  • 10
  • 26

3 Answers3

1

The ApplicationBar and ApplicationBarIconButton are theme aware, they will automatically change their foreground color if you change your phone's theme to light or dark.

To style other elements, you can access the current themes foreground color via

{StaticResource PhoneForegroundBrush}

Gerrit Fölster
  • 984
  • 9
  • 18
  • Well I do want my application doesn't have dependency with device theme. I want it static. Can I do it? – albilaga Feb 01 '14 at 10:49
0

ApplicationBar color is following current phone theme, as also stated in @Gerrit answer. So to force it change to white, you can try applying light theme locally for your application (not changing phone theme entirely) using PhoneThemeManager.

ThemeManager.ToLightTheme();

Different ways to force your application displayed in light theme offered as answers to this question How to force windows phone 8 app to be run in light theme. And using Jeff Wilcox's PhoneThemeManager is the easiest, in my opinion.

Community
  • 1
  • 1
har07
  • 88,338
  • 12
  • 84
  • 137
  • Ok. I found it. What about Accent Color in theme. Can it be edited? I need it because I want to use myy own colors when App bar pressed. And I also found if I use theme manager, my edited background color in application bar forced to use theme from PhoneThemeManager – albilaga Feb 01 '14 at 12:01
  • Better to open [new questions](http://stackoverflow.com/questions/ask). You have 2 questions, and my answer to the 1st question : currently, I don't know the answer until I try to find out (try google search maybe). to the 2nd, I don't have any idea until I see some of your codes showing how you set background color. – har07 Feb 01 '14 at 12:16
0

This is what u want

this.ApplicationBar.ForegroundColor = Color.FromArgb(255, 255, 255, 255);

You can create ApplicationBar in code like:

ApplicationBar = new ApplicationBar();
ApplicationBar.BackgroundColor = Color.FromArgb(255, 52, 73, 94);
ApplicationBar.ForegroundColor = Color.FromArgb(255, 255, 255, 255);

Hope this helps.

Murat
  • 149
  • 1
  • 16