I use images in the navigation bar using the TitleView Layout. It works BUT ...
I encounter problem to set the size of the image according to the Height of the navigation bar.
<NavigationPage.TitleView> <StackLayout Orientation="Horizontal" VerticalOptions="Center" Spacing="10"> <Image Source="flechegauche.png" BindingContext="{x:Reference TitleLabel}" HeightRequest="{Binding Height}"/> <Label x:Name="TitleLabel" Text="Evènements" FontSize="16" TextColor="White" VerticalTextAlignment="Center" VerticalOptions="FillAndExpand" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand" /> <Image Source="filtre.png" HeightRequest="{OnPlatform iOS=60, Android=35, Default=40}"/> <Image Source="flechedroite.png" HeightRequest="{OnPlatform iOS=60, Android=35, Default=40}"/> </StackLayout> </NavigationPage.TitleView>
It works if i use : HeightRequest="{OnPlatform iOS=60, Android=35, Default=40}"
But this doen't work : BindingContext="{x:Reference TitleLabel}" HeightRequest="{Binding Height}"
Why ?!? It's still the best way to link the height of the image to the height of the navigation bar (to ensure that the image correctly fit), isn't it ?
I also tried setting "Aspect" to "AspectFit" but it doesn't change anything.
VerticalOptions="FillAndExpand"on theImagework? - pinedax