MVVM Messenger Register for any changed event #4375
Unanswered
XySoftNeil
asked this question in
Questions & Help
Replies: 1 comment
-
You can extend the |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to register to get any changed event, not by type? I'm trying to implement a relay command that calls NotifyCanExecuteChanged when one of the dependent properties changes.
Messenger.Register<AutoRelayCommand, PropertyChangedMessage>(this, static (r, m) =>
{
if (r.properties != null && r.properties.Contains(m.PropertyName))
r.NotifyCanExecuteChanged();
});
Thanks,
Neil
Beta Was this translation helpful? Give feedback.
All reactions