Event Checked for Cross Platform Xamarin

Asked

Viewed 88 times

2

You can create a button with the event Checked in Xamarin ? If yes, how to do ?

1 answer

0

try that way

checkbox.Click += (o, e) => {
    if (checkbox.Checked)
        // checkbox selecionado
    else
        // checkbox nao selecionado
};
  • This for a button or for a checkbox ?

  • this is the event for the check box in case the button uses only if inside the button event

  • button. Click += delegate (Object Sender, Eventargs e) { if (checkbox.Checked) // checkbox selected Else // checkbox not selected }

  • then I needed to make the button have the behavior of a checkbox. Like, when you click the button it sinks when you click again, it goes back to its normal state.

  • So just manipulate the behavior of the button An easier way I don’t know if it’s quite what you could use the easiest Switchcell https://developer.xamarin.com/api/type/Xamarin.Forms.SwitchCell/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.