IsVisible
有问题,目前只能通过Xaml将其设置为Collapsed
,尽管微软表示将其设置为false不会保留空间。
试试这个:
<StackLayout IsVisible="{Binding IsActive}" HeightRequest="{OnPlatform iOS=-1,Default=1}" ...
或者这些一起:
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<StackLayout IsVisible="{Binding IsActive}" HeightRequest="50" ...