title: How to manage(hide) Back Button and Master Page in navigation while Deeplinking?
body: <p>On <code>HomePage</code> of Button <code>Update Profile</code>, it redirects and working fine. But when I try to go to <code>Update Profile</code> page from any other place like DeepLink, it shows <code>Back Button</code> with a word <code>Master Page</code>. Can anybody please suggest me what I am missing here?</p>
  
  <p><a href="https://i.stack.imgur.com/wQTRJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wQTRJ.png" alt="enter image description here"></a></p>
  
  <p>HomePage(Master)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;local:MasterDetailPageWithLifecycle xmlns="http://xamarin.com/schemas/2014/forms" 
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
           xmlns:local="clr-namespace:MyProject;assembly=MyProject"
           x:Class="MyProject.HomePage"
           OnAppearingCommand="{Binding OnAppearingCommand}"
           Title="Master Page"&gt;
      &lt;MasterDetailPage.Master&gt;
          &lt;ContentPage Title="Home page" Icon="hamburger.png"&gt;
              &lt;ContentPage.Resources&gt;
                  &lt;ResourceDictionary&gt;
                      &lt;local:MenuItemDataTemplateSelector x:Key="menuItemDataTemplateSelector" HighlitedTemplate="{StaticResource highlitedTemplate}"
                                                          NormalTemplate="{StaticResource normalTemplate}" /&gt;
                  &lt;/ResourceDictionary&gt;
              &lt;/ContentPage.Resources&gt;
              &lt;StackLayout BackgroundColor="{DynamicResource d8Purple}" VerticalOptions="FillAndExpand" Padding="0, 48, 0, 0"&gt;
                  &lt;StackLayout Padding="0, 40, 0, 0" Spacing="0"&gt;
                      &lt;ListView x:Name="listView" Margin="0,9,0,0" VerticalOptions="FillAndExpand" SeparatorVisibility="None"
                                ItemSelected="OnItemSelected" ItemTemplate="{StaticResource menuItemDataTemplateSelector}" /&gt;
                      &lt;/StackLayout&gt;
                  &lt;/StackLayout&gt;
              &lt;/StackLayout&gt;
          &lt;/ContentPage&gt;
      &lt;/MasterDetailPage.Master&gt;
  &lt;/local:MasterDetailPageWithLifecycle&gt;
  </code></pre>
  
  <p>HomePage.cs</p>
  
  <pre><code>public HomePage()
  {
      InitializeComponent();
      BindingContext =_vm = App.Locator.Home;
      NavigationPage.SetHasNavigationBar(this, false);
      _masterPageItems = new List&lt;MasterPageItem&gt;();
      _masterPageItems.Add(new MasterPageItem
      {
          Title = "Update Profile",
          TargetType = nameof(EditProfilePage)
      });
  
      listView.ItemsSource = _masterPageItems;
  }
  
  public void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
  {
      var item = e.SelectedItem as MasterPageItem;
      if (item != null)
      {
          var name = item.TargetType;
          if (name == "EditProfilePage")
          {
              Detail = new MyProjectNavigationPage(new EditProfilePage());
              listView.SelectedItem = null;
              IsPresented = false;
          }
      }
  }
  
  public class MyProjectNavigationPage : NavigationPage
  {
      public MyProjectNavigationPage(Page root) : base(root)
      {
          if (Device.OS == TargetPlatform.iOS)
          {
              BarTextColor = Colors.d8Grey;
              BarBackgroundColor = Color.White;
              Title = root.Title;
          }
      }
  }
  </code></pre>
  
  <p>EditProfile XAML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;local:ContentPageWithCustomBackButton
      xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:local="clr-namespace:MyProject;assembly=MyProject"
      x:Class="MyProject.EditProfilePage"
      OnAppearingCommand="{Binding OnAppearingCommand}"
      Title="Update Profile"&gt;
    &lt;ContentPage.Content&gt;
      &lt;Grid RowSpacing="0"&gt;
        //Design content
      &lt;/Grid&gt;
    &lt;/ContentPage.Content&gt;
  &lt;/local:ContentPageWithCustomBackButton&gt;
  </code></pre>
  
  <p>EditProfile CS</p>
  
  <pre><code>public EditProfilePage()
  {
      InitializeComponent();
      BindingContext=_editProfileViewModel = App.Locator.EditProfile;
      _editProfileViewModel.PropertyChanged += ViewModel_PropertyChanged;
  }
  </code></pre>
  
  <p>EditProfileDeeplink</p>
  
  <pre><code>public override void Navigate(string uri)
  {
      _navigationService.NavigateTo(nameof(EditProfilePage));
  }
  </code></pre>