Forum Cross Platform with Xamarin


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to add TitleIcon and button to navigation bar of NavigationPage?

AsifMayilliAsifMayilli USMember
edited November 2016 in Cross Platform with Xamarin

Hi people. I am trying to add TitleIcon and reload button to Navigation Bar of NavigationPage but dont know how to do it. I tried to use Icon property for navigation page but it does not work. About adding buttons to navigationpage i have not found anything.

`<?xml version="1.0" encoding="UTF-8"?>
<MasterDetailPage xmlns="" 



    <MasterDetailPage.Detail >

        <NavigationPage BarBackgroundColor="#7FBE5D" x:Name="NavBar" Icon="image.png">




Best Answer


  • AsifMayilliAsifMayilli USMember

    @Neocomer thanks. It works fine. But what about TitleIcon instead of text title? Lets say for example instead of Paid invoice put logo.

  • NeocomerNeocomer GBMember ✭✭
    edited November 2016

    You would need to create a custom renderer for that. As for how to go about that. i can't say i'm too sure. i tend to run away from custom renders.
    Try this to get the page icon which if i remember loads near the text
    NavigationPage.SetTitleIcon(this, fileName);

  • freezer27freezer27 Member ✭✭
    edited June 2019

    You can customize the Bar in XAML without f#cking custom renders:

            <StackLayout Orientation="Horizontal">
                <Image Source="IconOrImageHere">
                   Text="Title here"
                   VerticalTextAlignment="Center" />
Sign In or Register to comment.