Questions tagged [canexecute]
66 questions
0
votes
1 answer
Force reevaluate ICommand CanExecute upon context menu open
I know I can force reevalution of CanExecute in the view model, however, this requires the view model to register to all related data change events, which might not be always feasible.
Since the commands are only used in the context menu, and…

NS.X.
- 2,072
- 5
- 28
- 55
0
votes
1 answer
How to make an ICommand CanExecute start with false?
I have error validation in my viewModel, such that when the UserName is not at least 2 characters long, it will have a validation error.
When my application starts up, this field is not validated and is considered to have no errors. It is only when…

Cowman
- 678
- 7
- 25
0
votes
1 answer
WPF - Button control template...keep template items enabled when Command.CanExecute is false
I have a listView where each item consists of a dataTemplate containing a Button. This is due to a requirement where clicking on the list item will act like a button click to move you into the next step of a "Wizard".
Each Button in the…

tronious
- 1,547
- 2
- 28
- 45
0
votes
1 answer
WPF Command CanExecute event doesn't fire unless RibbonGroup dropdown is open
I have about 5 RibbonGroups inside a RibbonTab and each ribbon group contains about 3-5 commands. To fit everything on screen, WPF Ribbon control automatically collapse few RibbonGroups into dropdown menus. Nothing special till here.
Now I see that…

digitguy
- 1,014
- 2
- 12
- 29
0
votes
1 answer
I know I'm doing something wrong with RaiseCanExecuteChanged and CanExecute
Well after fiddling with MVVM light to get my button to enable and disable when I want it to... I sort of mashed things together until it worked.
However, I just know I'm doing something wrong here. I have RaiseCanExecuteChanged and CanExecute in…

Cowman
- 678
- 7
- 25
-1
votes
1 answer
Making Command 1-time-executable
what is best practice to make a DelegateCommand from Prism framework in MVVM only one time executable in order to prevent click-spamming the button which may result in application crashes.
many thanks!

Julian Peil
- 105
- 10