protected async override void OnElementChanged (ElementChangedEventArgs<Button> e)
{
base.OnElementChanged (e);
if (byPassButton == null) {
byPassButton = new UIButton (UIButtonType.Custom);
byPassButton.Frame = this.Frame;
SetNativeControl (byPassButton);
base.Control.TouchUpInside += byPassButton_TouchUpInside;
SetField (this, "buttonTextColorDefaultNormal", base.Control.TitleColor (UIControlState.Normal));
SetField (this, "buttonTextColorDefaultHighlighted", base.Control.TitleColor (UIControlState.Highlighted));
SetField (this, "buttonTextColorDefaultDisabled", base.Control.TitleColor (UIControlState.Disabled));
InvokeMethod (this, "UpdateText", null);
InvokeMethod (this, "UpdateFont", null);
InvokeMethod (this, "UpdateBorder", null);
InvokeMethod (this, "UpdateImage", null);
InvokeMethod (this, "UpdateTextColor", null);
}
if (e.NewElement != null) {
Control.ShowsTouchWhenHighlighted = false;
Control.AdjustsImageWhenHighlighted = false;
await SetNormalImageResource ();
await SetDisableImageResource ();
await SetPressImageResource ();
}
}