wpf 4.0 - In WPF, how to check/uncheck a checkbox on 1/0 or y/n entered by user -


i have checkbox in user control. want user able check checkbox when enters y or 1, , uncheck when n or 0 entered.

better have in xaml if possible.

thank in advance, appreciated.

you can add keybinding usercontrol respond key presses in xaml, still need write command changes binding property.

<usercontrol.inputbindings>     <keybinding key="y" command="{binding mycommand}" />     <keybinding key="n" command="{binding mycommand}" />     <keybinding key="d0" command="{binding mycommand}" />     <keybinding key="d1" command="{binding mycommand}" /> </usercontrol.inputbindings> 

Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -