Picker Title Color in ios

BasuBasu USMember ✭✭

How to Change Picker Title Color in ios


  • KolaMounikaKolaMounika USMember ✭✭✭


    Are you using custom renders or cross platform ?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭


    I have used this code for XF Effects. Maybe you can find an asnwer here

  • BasuBasu USMember ✭✭

    @Mounika Kola s im using custom renderer but it giving null reference exception
    public class BluePickerRendere:PickerRenderer

        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Picker> e)
            if (this.Control == null) return;
            this.Control.AttributedPlaceholder = new Foundation.NSAttributedString(this.Control.AttributedPlaceholder.Value, foregroundColor: UIColor.FromRGB(6, 140, 201));
            this.Control.Font = UIFont.FromName("Proxima Nova", 15.0f);
            this.Control.BackgroundColor = UIColor.Clear;
            this.Control.TextColor = UIColor.FromRGB(6, 140, 201);
            this.Control.BorderStyle = UITextBorderStyle.None;
            this.Control.Layer.BorderColor = UIColor.White.CGColor;
  • BasuBasu USMember ✭✭

    @Alessandro Caliaro
    Thanx Alessandro Caliaro, but i need picker title color

  • LibinJosephLibinJoseph NZDeveloper Group Leader ✭✭

    Control.AttributedPlaceholder = new Foundation.NSAttributedString(Control.AttributedPlaceholder.Value, foregroundColor: Color.FromHex("FFFFFF").ToUIColor());

    Add this code to your custom renderer and it will be all good. Even better, if you make the color property bindable from XAML

  • rio_riyario_riya INMember ✭✭

    @LibinJoseph Thanks , Its working. Is there anyway to change it dynamically again when picker clicked or Focused?

Sign In or Register to comment.