Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-3783) Add OnCommand and OffCommand to ToggleSwitch #3785

Merged
merged 1 commit into from Apr 29, 2020

Conversation

punker76
Copy link
Member

@punker76 punker76 commented Apr 29, 2020

Describe the changes you have made to improve this project

Add OnCommand and OffCommand properties to the ToggleSwitch. The previous ToggleSwitch had similar commands which allowed simple logic for this 2 states.

The command parameter for both commands will be the value of the CommandParameter or the ToggleSwitch if the property is null.

If the commands are not executable then the ToggleSwitch is still enabled, it will only disable the execuation.

e.g.

<Controls:ToggleSwitch CommandParameter="{Binding}"
                       OnCommand="{Binding ToggleSwitchOnCommand}"
                       OffCommand="{Binding ToggleSwitchOffCommand}" />

Closed Issues

Closes #3783

@punker76 punker76 added this to the 2.0.0 milestone Apr 29, 2020
@punker76 punker76 merged commit defa704 into develop Apr 29, 2020
@punker76 punker76 deleted the feature/GH-3783-ToggleSwitch-On-Off-Commands branch April 29, 2020 21:23
@fradsham
Copy link

Thank-you @punker76 . This is a great help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

CheckedCommand and UnCheckedCommand Missing in 2.0.0-Alpha0748
2 participants