Search
Thursday, October 18, 2018 ..:: Home ::.. Register  Login

Peter Henry on Facebook  Peter Henry on LinkedIn  Peter Henry on Twitter

   Calendar  
     
  
   Search  
     
  
   Blogroll  
     
  
   Disclosure  
All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.
     
  
   TechTidBits (Blog)  

Can you change the WP7 ApplicationBar background? YES!

Oct 28

Written by:
Friday, October 28, 2011 7:54 PM  RssIcon

imageAre you making a WP7 application?  COOL!  Want to change the background, read on for the quick'n'dirty for how!

imageSO!  You want to change your ApplicationBar BackgroundColor, COOL!  I tried to do this in WP7 last year, but I wasn’t able to figure it out (ok, maybe it COULD be done, but I just hadn’t had enough coffee when I tried to figure it out?  That’s my excuse and I’m sticking with it! haha).  Well today I noticed Louis-Philippe Pinsonneault TechDays 2011 (Canada) WP7 application was doing exactly this, he changed the ApplicationBar BackgroundColor (notice the US spelling there?). 

Ok, so I thought, OH!  He got it to work, COOL!  So I can try it out on mine.  The good is, it can be done and it’s easy, just use this

<shell:ApplicationBar BackgroundColor="#57627E">

(Notice the US spelling of Color)  And then you’ll get this below.

image

Ok, so that’s the good news, you can do it!!!!  The bad news…it’s not bindable, you can’t use StaticResources.  DOH!  I have that shade of color setup in my App.XAML as a resource, but at this time, you can’t use StaticResources.  Don’t believe me?  Want to try it out?  (haha you and I think alike)  Here’s what VS gives you when you DO try it out.

image

 

So now that you know how to add one more cool element of colour (notice the CANADIAN spelling there HAHA) to your WP7, it’s time to grab a coffee and get coding!

 

Resources:

WP7 Marketplace: TechDays 2011 (Canada)

devlicious.us: Changing the Background and Foreground Colors for an Application Bar on WP7 by Derik Whittaker

Tags:
Categories:
Location: Blogs Parent Separator TechTidBits

2 comment(s) so far...


Gravatar

Re: Can you change the WP7 ApplicationBar background? YES!

You can also change the Foreground Colour.
ForegroundColor="{StaticResource PhoneAccentColor}"

Yes Peter, StaticResource works. ;-)

John...

By John Marshall on   Thursday, November 24, 2011 9:39 PM
Gravatar

Re: Can you change the WP7 ApplicationBar background? YES!

You were abe to get the StaticResource to work? hhhmm is it tied to the ForegroundColor but not the BackgroundColor (that just smells bad if that's the way it is). I have to try this out! Thank you John for your comment! I hope you come back to visit (and comment) again! Have a good one!

By Peter Henry on   Wednesday, November 30, 2011 10:42 PM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
     
  
Copyright 1999-2012 by PCHenry.com   Terms Of Use  Privacy Statement