CommunityToolkit / CommunityToolkit/dotnet

Undocumented change in RelayCommand compared to MVVM Light

Open
#1,148 0 comments 1 reaction 0 assignees View on GitHub
feature request :mailbox_with_mail:
Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

### Overview

Compared to MVVM Light, RelayCommand has a major (undocumented) breaking change as it doesn't seem to integrate with CommandManager - as a result, their `CanExecuteChanged` event doesn't fire automatically anymore, which broke tons of functionality in our app.

In order to fix the issue, my approach would have been to subclass RelayCommand and subscribe to CommandManager, but the class is sealed. Not sure I see a reason for this - wouldn't it make sense to unseal the class? I've had use cases before where I would have appreciated that already in order to provide hooks.

### API breakdown

- If possible, update https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/migratingfrommvvmlight
- Unseal RelayCommand implementations

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.