问题描述
Fab.Forms软件包在我的系统上不起作用。它要求将目标框架从.Net标准更改为.Net Framework。因此,有没有其他方法可以使FAB通过可滚动的Web视图获得。该webview拥有一个网站。
解决方法
我认为使用网格是将FAB放置在可以滚动的视图上的简单方法。
这是xaml示例:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<WebView Grid.Row="0" Source="http://xamarin.com" />
<Button Grid.Row="0" Text="☆" FontSize="Large" BorderColor="Black" BorderWidth="1" FontAttributes="Bold" BackgroundColor="OrangeRed" BorderRadius="35" TextColor="White" WidthRequest="70" HeightRequest="70" Margin="0,20,22" HorizontalOptions="End" VerticalOptions="End"/>
</Grid>