I'm using Xamarin.Forms, and in iOS I made a custom render for PageRenderer where I can apply a gradient image to the NavigationBar.ShadowImage like below:
this.NavigationController.NavigationBar.ShadowImage = UIImage.FromFile("line_navigationbar.png");
In my project I have some Pages where the separator navigation bar is hidden like this:
On<iOS>().SetHideNavigationBarSeparator(true);
The problem is that my custom render applies the ShadowImage to all pages, including the ones I set to hide the separator. In my iOS custom render, how can I do like this:
if (!this.NavigationController.NavigationBar.isNavigationBarSeparatorHidden?) {
this.NavigationController.NavigationBar.ShadowImage = UIImage.FromFile("line_navigationbar.png");
}
Is there a way to check in my iOS PageRenderer if the NavigationBarSeparator is set to hidden, so I apply the ShadowImage just to the correct pages?