public void OnClick(View v) { MyButtonRenderer buttonRenderer = v.Tag as MyButtonRenderer; if (buttonRenderer != null) { // have to cast to MyButton to access the new SendClicked method // which replaces that of the base class Button MyButton myButton = (MyButton)buttonRenderer.Element; myButton.SendClicked(); //buttonRenderer.ForceUpdateText(); } }
public bool OnLongClick(View v) { MyButtonRenderer buttonRenderer = v.Tag as MyButtonRenderer; if (buttonRenderer != null) { // have to cast to MyButton to access the new SendClicked method // which replaces that of the base class Button MyButton myButton = (MyButton)buttonRenderer.Element; myButton.ShowDeleteButton(); buttonRenderer.ForceUpdateText(); } return(false); }