Issue
I'm working around with Xamarin Forms and today I've realized weird thing on iOS in my app. The top Shell items (usually back button and page title) now have some weird shadow and I can't figure out how to disable it. Could someone help me with this please?
Those two items:
<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>
Solution
You can set it in your appshell.xaml
:
<Style x:Key="BaseStyle" TargetType="Element">
.....
<Setter Property="Shell.NavBarHasShadow" Value="False" />
</Style>
Answered By - maxikraxi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.