Replies: 1 comment
-
Just ran into this exact same issue. I have a CanExecute method for a save button looking at an IsDirty flag on a detail view model. That view model gets updated via a message when an item is selected from a master ListView. Problem is CanExecute is called before the broadcast and so is looking at the previous detail viewmodel state. Even the docs here indicate that Broadcast() should get called before the PropertyChanged() calls: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following Property and Command
ExportService looks like this:
Now, the problem is, the following generated Code:
Broadcast
is called afterExportButtonCommand.NotifyCanExecuteChanged();
, therefore the button is disabled and keeps disabled, until the next output change.Of course this code is simplified and there are other properties that are checked for
CanExport
.My question is:
a) Is this an ok-ish way to do?
b) What are my possibilities to raise a
ExportButtonCommand.NotifyCanExecuteChanged();
from theExportService
, so that the button can be enabled again?Beta Was this translation helpful? Give feedback.
All reactions