Hi,
I have build a custom renderer to set the Textcolor (Foreground) for a Picker on Windows Phone.
`public class WindowsPickerRenderer : PickerRenderer
{
private static Brush _textColor;
private static Brush _borderColor;
static WindowsPickerRenderer()
{
_textColor = new SolidColorBrush(Color.FromArgb((byte)255, (byte)(AppController.AppTextColor.R * 255), (byte)(AppController.AppTextColor.G * 255), (byte)(AppController.AppTextColor.B * 255)));
_borderColor = new SolidColorBrush(Color.FromArgb((byte)255, (byte)(AppController.AppFormBorderColor.R * 255), (byte)(AppController.AppFormBorderColor.G * 255), (byte)(AppController.AppFormBorderColor.B * 255)));
}
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Picker> e)
{
base.OnElementChanged(e);
Control.Foreground = _textColor;
Control.BorderBrush = _borderColor;
Control.BorderThickness = new Thickness(1);
}
}`
It works fine, if the Picker has less than five values. But if there are more than no foreground color will be set.
How can I achive this too?