Conditional Keybinding
<Window.InputBindings>
<KeyBinding Command="{Binding Path=CMD_Login}" Gesture="Enter" />
</Window.InputBindings>
but I would like this key-binding to only be active if the user is logging in. They login window is set to visible/collapse depending if the user is logging in or not, so was wandering if the conditional can possibly be based on that?
Thank YouIf you have a command, shouldn't the CanExecute
part handle that by not always returning true?
精彩评论