messier16 / Forms.Controls

Home of all Messier16 Xamarin.Forms controls 😁 (now .NET standarized)
MIT License
20 stars 8 forks source link

Command Triggering #4

Closed IeuanWalker closed 2 years ago

IeuanWalker commented 6 years ago

Hi,

I want to use your checkbox control instead of the default switch. At the moment I am binding a boolean to the 'IsToggled' and using the 'Toggled' parameter to trigger an action whenever the switch is toggled.

Is there a way to have the same result using the checkboxes, because at the moment I'm using the 'Checked' parameter to bind the boolean, but cannot figure out how to trigger an action when it is checked.

Thanks.

libin85 commented 6 years ago

@IeuanWalker : did u get this working?

IeuanWalker commented 6 years ago

Nope, well sort of, at the moment I have a checkbox and a switch binding to the same Boolean (Checked/ IsToggled) and I have the Toggled property of the switch pointing to a method.

I have hidden the switch (IsVisable) so when the checkbox is checked (or unchecked) it toggles the hidden switch and causes the Toggled method to trigger.

fferegrino commented 6 years ago

@IeuanWalker are you using an MVVM framework?

IeuanWalker commented 6 years ago

@fferegrino I'm using the MVVM design but I'm not using any specific framework

IeuanWalker commented 2 years ago

Closing as no longer using this package