You could use AbsoluteLayout and set the transparent of the "float" view .
<AbsoluteLayout>
<!--below view-->
<StackLayout BackgroundColor="Red" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Button Text="111111" />
</StackLayout>
<!--float view-->
<StackLayout BackgroundColor="Gray" Opacity="0.5" AbsoluteLayout.LayoutBounds="0.5,0,1,0.5" AbsoluteLayout.LayoutFlags="All" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
</StackLayout>
</AbsoluteLayout>
Update
It is impossible to implement it if use Navigation . Because it is not enough to set the backgroundColor of Page . There are Rendering layers in the ContentPage .
As a workaround , we could simulate a navigation (open a new page) .
<AbsoluteLayout>
<!--below view-->
<StackLayout BackgroundColor="Red" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Button Text="open new page" Clicked="Button_Clicked_1"/>
</StackLayout>
<!--float view-->
<StackLayout x:Name="FloatView" BackgroundColor="Gray" Opacity="0.5" AbsoluteLayout.LayoutBounds="1,1,0.01,1" AbsoluteLayout.LayoutFlags="All" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Label Text="this is a transparent view" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" />
<Button Text="Back" Clicked="Button_Clicked"/>
</StackLayout>
</AbsoluteLayout>
private void Button_Clicked_1(object sender, EventArgs e)
{
//show
Device.BeginInvokeOnMainThread(async () =>
{
var xPosition = 0;
var currentPosition = 0.9;
while (currentPosition >xPosition)
{
await Task.Delay(1);
currentPosition -= 0.04;
AbsoluteLayout.SetLayoutBounds(FloatView, new Rectangle(currentPosition,0, 1, 1));
}
});
}
private void Button_Clicked(object sender, EventArgs e)
{
//hide
Device.BeginInvokeOnMainThread(async () =>
{
AbsoluteLayout.SetLayoutBounds(FloatView, new Rectangle(1, 0, 0.01, 0.01));
});
}