Reputation: 1869
this is what I have:
this is what I want to get:
If there is no pages in navigation stack, then title icon will be in left corner, else there will be back arrow and "Back" text. I didn't find any options to customize it, is it possible at all?
Upvotes: 3
Views: 8321
Reputation: 7454
You can change arrow to hamburger icon if you use your MasterPage
within NavigationPage:
Detail = new NavigationPage(masterPage);
If you want to hide icon - it only applies to Android. It can be solved with custom renderer (http://developer.xamarin.com/guides/cross-platform/xamarin-forms/custom-renderer/):
[assembly:ExportRenderer (typeof(NavigationPage), typeof(CustomNavigationRenderer ))]
public class CustomNavigationRenderer : NavigationRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<NavigationPage> e)
{
base.OnElementChanged (e);
var actionBar = ((Activity)Context).ActionBar;
actionBar.SetIcon (Resource.Color.Transparent);
}
}
To change icon, just change project files:
or on your MasterDetailPage
set Icon
property to another resource.
Upvotes: 3