如何在 Xamarin 中添加带有地图的导航栏

问题描述

我想在我的地图页面顶部添加相同的栏。但我找不到添加方法

My code

What I want to do

What I have

解决方法

用户 NavgationPage 而不是 ContentPage 并设置 TitleView

<NavigationPage.TitleView>
    <StackLayout Orientation="Horizontal">
        <Image Source="logo.png" />
        <Label Text="myTitle" VerticalTextAlignment="Center"/>
    </StackLayout>
</NavigationPage.TitleView>