Reputation: 434
I created a metrostyle ap using c#, when I started I choose the grid option, but I need to change the background of my app, to an image or another color.
I followed the Microsoft tutorial link
I put in common/standarStyle next code but doesn't work, I know that is something very simple but don´t works for me.
<Grid Background="{StaticResource WindowsBlogBackgroundBrush}">
// Add this brush to the resource dictionary in App.xaml.
<SolidColorBrush x:Key="WindowsBlogBackgroundBrush" Color="#FF0A2562"/>
Upvotes: 1
Views: 9854
Reputation: 11
Set Background property of grid to
grid.Background = new SolidColorBrush(Windows.UI.Color.FromArgb(1,10,37,98));
Upvotes: 1
Reputation: 434
easiest way is: use the program blender, (wich comes in the package for developers in microsoft site) open a new project (and open as new our project made in vs) left button, it opens the tool designer, and you can choose the solid color brush or gradient brush option.
Upvotes: 0
Reputation: 31724
You can try this:
<Grid>
<Grid.Background>
<SolidColorBrush
Color="#FF0A2562" />
</Grid.Background>
...
</Grid>
If it does not help then perhaps your Grid is not visible - its content might have a different color and fill the grid completely - then you would not see its color.
Upvotes: 1