-1

When I clicked Application Bar Button in WP8, the button background changes to be PhoneAccentColor. Is it possible to change its color when I clicked it (pressed state)? I use a global AppBar and it's in App.xaml

<Application.Resources>
        <ResourceDictionary x:Name="myDict">
            <!-- Application Bar template !-->
            <shell:ApplicationBar x:Key="GlobalAppBar" IsVisible="True" IsMenuEnabled="True" BackgroundColor="#f28624"  >
                <shell:ApplicationBarIconButton IconUri="/Assets/AppBar/feature.email.png" Text="new message" Click="ApplicationBarNewMessage_Click" />
                <shell:ApplicationBar.MenuItems>
                    <shell:ApplicationBarMenuItem Text="users" Click="Users_Click"/>
                    <shell:ApplicationBarMenuItem Text="settings" Click="Settings_Click"/>
                    <shell:ApplicationBarMenuItem Text="about" Click="About_Click"/>
                </shell:ApplicationBar.MenuItems>
            </shell:ApplicationBar>
        </ResourceDictionary>
    </Application.Resources>

Thank you :)

Hai Cu
  • 130
  • 1
  • 7
  • it is duplicate of http://stackoverflow.com/questions/18479826/how-to-change-the-color-of-application-bar-buttons-when-pressed – techloverr Nov 26 '13 at 12:50

2 Answers2

2

WP8 uses two default colors Black and White as a default, but they can be set by defining as ApplicationBar.Foreground, you can check this post with same question check this post hope this helps you out.

Community
  • 1
  • 1
Dexto
  • 1,151
  • 9
  • 18
0

Set ForegroundColor to #FFFEFEFE if you want white or any other color in the appbar

<shell:ApplicationBar ForegroundColor="#FFFEFEFE" BackgroundColor="#FFCB202D">
....
</shell:ApplicationBar>

If you set it to White then it will not help, because as per the msdn doc white is discarded and the default theme color is used to set the feedback of buttons.

Chhaya Sharma
  • 464
  • 2
  • 13