Reputation: 11419
I'm filling a grid with views. This takes some time. During the filling, the background stays black. When views are added, the black background goes aways accordingly.
However, I would like the grid's backgroundcolor to be White instead of Black.
No matter what I do, I just don't seem to be able to set the backgroundcolor.
I've set the NavigationPage's backgroundcolor to Color.White, and I've set the Grid's backgroundcolor to Color.White.
What else could I do to make the backgroundcolor white?
I'm not sure if the mistake is really on my side.
Here you can see what's happening:
First the grid's background is black. When views are added, the black background is overdrawn by the views.
On the right side you can see that 5 views have already loaded. The 6nd view has not yet loaded, so the background is still black. [![enter image description here][1]][1]
Edit:
In the NavigationPage / ContentPage I have this:
public MainPage()
{
this.BackgroundColor = Color.White;
In this MainPage, I have a Grid ("_BigGridAsLayout") in which a custom bottom navbar is placed. This "_BigGridAsLayout" occupies the entire page:
_BigGridAsLayout = new Grid()
{
BackgroundColor = Color.White,
}
(...)
_BigGridAsLayout.Children.Add(_CellGrid,0,0);
_BigGridAsLayout.Children.Add(_NavBar,0,1);
this.Content = _BigGridAsLayout;
Then I add "clsGridCell" views to the "_CellGrid". "clsGridCell" looks like this:
public clsGridCell(eImageAlignment uImageAlignment)
{
this.BackgroundColor = Color.White;
BackgroundColor = Color.White;
Upvotes: 0
Views: 422
Reputation: 765
Add the background color of the view (added in the grid ) to whatever color you want .
Upvotes: 1