Namespaces
Variants
Actions

Changing the Background and Foreground Colors of Application Bar on WP7

Jump to: navigation, search
SignpostIcon XAML 40.png
WP Metro Icon UI.png
Article Metadata

Tested with
SDK: Windows Phone 7.1 SDK
Devices(s): Nokia Lumia 800

Compatibility
Platform(s): Windows Phone 7.5 (Mango)

Article
Created: sreerajvr (05 Apr 2012)
Last edited: hamishwillee (10 Apr 2013)

Introduction

This article shows how to change the foreground and background colour of the Windows Phone Application Bar, in XAML.

XAML

<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.75" ForegroundColor="Green" BackgroundColor="Cyan" >
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

Summary

You can provide your colours with changing the attributes Opacity, Foreground and Background in the XAML.

This page was last modified on 10 April 2013, at 04:29.
298 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved