How can I remove the gray separator line between the status bar u from the Content page This is a Master Detail Page with a Content Page as the Detail.
Asked
Active
Viewed 854 times
1 Answers
1
Based on this SO question, you can create a custom renderer similar to this:
[assembly: ExportRenderer(typeof(NavigationPage), typeof(CustomNavigationPage))]
namespace CustomNavigationPage.iOS
{
public class CustomNavigationPage : NavigationRenderer
{
protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
base.OnElementChanged(e);
NavigationBar.SetBackgroundImage(new UIKit.UIImage(), UIKit.UIBarMetrics.Default);
NavigationBar.ShadowImage = new UIKit.UIImage();
}
}
}
-
Hi Paul, where would I create this? In the ios project Sorry, I am new to Xamarin world. – WPalombini Jun 18 '16 at 04:42
-
In the iOS project. See the guides for more information on custom renderers and getting started with them: https://developer.xamarin.com/guides/xamarin-forms/custom-renderer/ – Paul Jun 18 '16 at 04:57