Skip to content

Instantly share code, notes, and snippets.

@chagretes
Last active January 18, 2017 16:35
Show Gist options
  • Save chagretes/41a9d05263458c2f38314bfeca37a725 to your computer and use it in GitHub Desktop.
Save chagretes/41a9d05263458c2f38314bfeca37a725 to your computer and use it in GitHub Desktop.
OnElementPropertyChanged iOS Native
/**
* Cor do texto não estava sendo aplicada conforme estilo
* no iOS quando o status do entry é setado para false
*
* Para contornar este bug a alteração foi feita programaticamente
*/
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName.Equals("IsEnabled"))
{
if ((Control != null) && (!Element.IsEnabled))
{
Control.TextColor = Xamarin.Forms.Color.FromHex("b5c6c9").ToUIColor();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment