Example #1
0
 private static void SetApperance(UINavigationBar.UINavigationBarAppearance bar, UIImage backgroundImg, UIColor color)
 {
     bar.TintColor    = UIColor.White;
     bar.BarTintColor = bar.BackgroundColor = color;
     bar.SetBackgroundImage(backgroundImg, UIBarMetrics.Default);
     bar.SetTitleTextAttributes(new UITextAttributes {
         TextColor = UIColor.White, Font = UIFont.SystemFontOfSize(18f)
     });
     bar.BackIndicatorImage = Images.Buttons.Back;
     bar.BackIndicatorTransitionMaskImage = Images.Buttons.Back;
 }
Example #2
0
        public static void Initialise()
        {
            UINavigationBar.UINavigationBarAppearance navigationBarAppearance = UINavigationBar.GetAppearance(new UITraitCollection());

            navigationBarAppearance.BarTintColor        = new UIColor((nfloat)(70 / 255.0), (nfloat)(130 / 255.0), (nfloat)(180 / 255.0), (nfloat)(1.0));
            navigationBarAppearance.TintColor           = new UIColor(1, 1, 0, 1);
            navigationBarAppearance.TitleTextAttributes = new UIStringAttributes
            {
                ForegroundColor = new UIColor(1, 1, 1, 1)
            };
        }
Example #3
0
 /// <summary>
 /// Apply this theme to all views with the given appearance.
 /// </summary>
 /// <param name="options">
 /// "blue", or null
 /// </para>
 public static void Apply(UINavigationBar.UINavigationBarAppearance appearance, string options = null)
 {
     if (options == "blue")
     {
         appearance.SetBackgroundImage(blueNavigationBarBackground.Value, UIBarMetrics.Default);
     }
     else
     {
         appearance.SetBackgroundImage(navigationBarBackground.Value, UIBarMetrics.Default);
     }
     appearance.SetTitleTextAttributes(new UITextAttributes {
         TextColor        = UIColor.FromRGBA(255, 255, 255, 255),
         TextShadowColor  = UIColor.FromRGBA(0, 0, 0, 0.8f),
         TextShadowOffset = new UIOffset(0, -1),
     });
 }
Example #4
0
        public static void Apply(UINavigationBar.UINavigationBarAppearance appearance, string options = null)
        {
            if (IsModern)
            {
                return;
            }

            appearance.TintColor = BarTintColor;

            appearance.SetTitleVerticalPositionAdjustment(-1, UIBarMetrics.Default);
            appearance.SetTitleVerticalPositionAdjustment(-4, UIBarMetrics.LandscapePhone);

            appearance.SetTitleTextAttributes(new UITextAttributes {
                TextColor        = BarTextColor,
                TextShadowColor  = BarTextShadowColor,
                TextShadowOffset = BarTextShadowOffset,
                Font             = UIFont.FromName(TitleFontName, BarTitleFontSize),
            });
        }
 public static void Apply(UINavigationBar.UINavigationBarAppearance appearance, string options = null)
 {
     ConfirmTrackBeamTheme();
     ThemeManager.Current.Apply(appearance);
 }