I'm struggling with this problem. In my content page i have a titleview containing a label and a button. If i execute in android everything works fine but in ios the button disappear out of the right of the screen.
The code:
<Shell.TitleView>
<Grid
Margin="0,0,0,0"
RowDefinitions="auto"
ColumnDefinitions="auto,*">
<Label
Grid.Column="0"
Text="{Binding Title}"
TextColor="{StaticResource TextGray}"
FontSize="Title"
VerticalTextAlignment="Center"
VerticalOptions="Center">
</Label>
<Grid
Grid.Column="1"
BackgroundColor="Green">
<ImageButton
Clicked="ShowSearchPage"
BackgroundColor="red"
HorizontalOptions="End"
Source="search"
></ImageButton>
</Grid>
</Grid>
</Shell.TitleView>
I tried your code but the testing result is a bit different, the icon is shown incompletely , I even tried to use
StackLayoutinstead of theouter Girdbut no luck , the calulation for the space TitleView occupy is incorrect , it is a potential issue , feel free to raise the issue on github : https://github.com/xamarin/Xamarin.Forms/issues.And for the temporary workaround , you can set
Marginon ImageButton , ugly but useful .