Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class BackgroundImagePage : ContentPage
{
public BackgroundImagePage() =>
Content = new Grid // this is the outer grid
{
Children =
{
// this image fills the outer grid and sits behind the 'original' content
new Image { Source = new Uri("https://tinyurl.com/msdevbg"), Aspect = Aspect.AspectFill },
new Grid // this is the 'original' content
{
Children =
{
new Button { Text = "Column 0", BackgroundColor = Color.Black.MultiplyAlpha(.5) }
.Size(120) .Center() .Col(0),
new Button { Text = "Column 1", BackgroundColor = Color.Black.MultiplyAlpha(.5) }
.Size(240) .Center() .Col(1),
}
}
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment