可以把网格放到AbsoluteLayout中,然后用另一个控件覆盖网格。如:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="App23.Page2">
<ContentPage.Content>
<StackLayout>
<AbsoluteLayout HeightRequest="600">
<Grid AbsoluteLayout.LayoutBounds="0,0,600,400" RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="7*"/>
</Grid.RowDefinitions>
<StackLayout HorizontalOptions="Fill" BackgroundColor="Green" Grid.Row="0"/>
<StackLayout HorizontalOptions="Fill" BackgroundColor="Blue" Grid.Row="1"/>
</Grid>
<StackLayout BackgroundColor="Red"
AbsoluteLayout.LayoutBounds="0,0,140,140"/>
</AbsoluteLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>
结果图像: