【发布时间】:2021-12-06 08:53:04
【问题描述】:
我正在使用 Xamarin Forms,今天我在我的应用程序中的 iOS 上发现了奇怪的事情。顶部的 Shell 项目(通常是后退按钮和页面标题)现在有一些奇怪的阴影,我不知道如何禁用它。有人可以帮我解决这个问题吗?
这两个项目:
<Shell.BackButtonBehavior>
<BackButtonBehavior Command="{Binding BackButtonCommand}" IconOverride="ic_arrow_green_left" />
</Shell.BackButtonBehavior>
<Shell.TitleView>
<Grid Style="{StaticResource NavBarGridWrapper}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="50" />
</Grid.ColumnDefinitions>
<Label Style="{StaticResource NavBarMainTitle}" Text="{Binding Source={x:Static appResources:Resource.SettingsTitle}, Converter={StaticResource StringToUpper}}" />
</Grid>
</Shell.TitleView>
App.xaml:
<!-- NavBar -->
<Style
x:Key="NavBarGridWrapper"
TargetType="Grid">
<!--<Setter Property="HorizontalOptions" Value="Fill" />
<Setter Property="VerticalOptions" Value="Fill" />-->
</Style>
<Style
x:Key="NavBarMainTitle"
TargetType="Label">
<Setter Property="FontFamily" Value="{StaticResource MontserratBold}" />
<Setter Property="FontSize" Value="{DynamicResource MediumFontSize}" />
<Setter Property="TextColor" Value="{StaticResource DarkGrayText}" />
<Setter Property="VerticalOptions" Value="Center" />
</Style>
【问题讨论】:
标签: c# ios xamarin xamarin.forms xamarin.ios