private void SetupBackground() { if (string.IsNullOrEmpty(ExtendedNavigationPage.GetBarBackground(Element)) && ExtendedNavigationPage.GetGradientColors(Element) == null) { SetupBackground(null, ExtendedNavigationPage.GetBarBackgroundOpacity(Element)); } else { if (!string.IsNullOrEmpty(ExtendedNavigationPage.GetBarBackground(Element))) { SetupBackground(UIImage.FromBundle(ExtendedNavigationPage.GetBarBackground(Element)), ExtendedNavigationPage.GetBarBackgroundOpacity(Element)); } else if (ExtendedNavigationPage.GetGradientColors(Element) != null) { SetupBackground(CreateGradientBackground(ExtendedNavigationPage.GetGradientColors(Element).Item1, ExtendedNavigationPage.GetGradientColors(Element).Item2, ExtendedNavigationPage.GetGradientDirection(Element)), ExtendedNavigationPage.GetBarBackgroundOpacity(Element)); } } }