Last active
January 18, 2017 16:35
-
-
Save chagretes/41a9d05263458c2f38314bfeca37a725 to your computer and use it in GitHub Desktop.
OnElementPropertyChanged iOS Native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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