Search code examples
c#xamlwindows-8windows-runtimewindows-store-apps

Windows store app: change background color of the Appbar


I have an Appbar on my app and the background is white, any ideas how I can change this? Here is my code:

 <AppBar>
     <Button       
    Style="{StaticResource HomeAppBarButtonStyle}" /> 
  </AppBar>

This gives: enter image description here

But I want to change it to this:enter image description here


Solution

  • The AppBar has a Background property. Use that property to set the color, for example by using a resource.

    <AppBar  Background="{StaticResource AppBarBackground}">
    

    AppBarBackground could be SolidColorBrush