Alternative to parameterized CanExecute predicate for ReactiveCommand #3639
Unanswered
JakenVeina
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, given that ReactiveCommand doesn't support CanExecute predicates, that are able to evaluate the proposed Execute parameter, and the normal recommended alternative is to determine executability of the command purely based on ViewModel properties, what is the alternative when the parameter is not available on the ViewModel?
My specific scenario involves a command to be executed upon drop of a dragged item into the View, with the parameter being the ID value of the item being dropped. This is within a TreeView, so not all items are drop-able onto all other items. For example, an item cannot be dropped onto itself, or its own parent, which would result in a recursive loop. Am I just stuck with implementing my own
ICommand
?Beta Was this translation helpful? Give feedback.
All reactions