Skip to content

Instantly share code, notes, and snippets.

@Sa1Gur
Last active December 3, 2019 08:41
Show Gist options
  • Save Sa1Gur/e2539677a7dfa12e9737b4bccad60619 to your computer and use it in GitHub Desktop.
Save Sa1Gur/e2539677a7dfa12e9737b4bccad60619 to your computer and use it in GitHub Desktop.
public class MyMaterialEntryRenderer : MaterialEntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
TintCustomization(Control, e.NewElement as MyMaterialEntry);
}
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
TintCustomization(Control, sender as MyMaterialEntry);
}
private void TintCustomization(UITextField Control, MyMaterialEntry customEntry)
{
if (Control == null) return;
if (customEntry != null)
{
UITextField textField = Control;
textField.BorderStyle = UITextBorderStyle.None;
textField.TintColor = customEntry.MyHandleColor.ToUIColor();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment