Home > database >  How to display views in the navigation bar in Xamarin.Forms Shell pages
How to display views in the navigation bar in Xamarin.Forms Shell pages

Time:11-25

How to display views in the navigation bar in Xamarin.Forms Shell pages?

menu screenshot

The MainPage starts with like this:

MainPage = new AppShell();

CodePudding user response:

The Shell.TitleView attached property, of type View, enables any View to be displayed in the navigation bar.

While this property can be set on a subclassed Shell object, it can also be set on any pages that want to display a view in the navigation bar. For example, the following XAML shows displaying a Label in the navigation bar:

    <Shell.TitleView>
        <Label>title here </Label>
    </Shell.TitleView>
  • Related