-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Microsoft.Toolkit.Mvvm package (Preview 4) #3527
[Feature] Microsoft.Toolkit.Mvvm package (Preview 4) #3527
Conversation
Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Hi @Sergio0694, I just noticed that the RelayCommand is a SEALED class. Why? I would love to derive from it. I would love to create something like a LabeledRelayCommand like this. public class LabeledRelayCommand : RelayCommand, ILabeledCommand {
public LabeledRelayCommand(Label label, Action execute) : this(label, execute, null) {
}
public LabeledRelayCommand(Label label, Action execute, Func<bool> canExecute) : base(execute, canExecute) {
this.Label = label ?? throw new ArgumentNullException(nameof(label));
}
public Label Label { get; }
} |
Hey @sonnemaf - they're sealed because each command is not really meant to be extended in functionality, both due to how they're internally structured (eg. the |
@Sergio0694 Thank you for this explanation. This makes sense I will use the containment solution you suggested. |
Awesome, glad I could help! 😊 |
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Follow up to #3428
This PR is for tracking all changes/fixes/improvements to the
Microsoft.Toolkit.Mvvm
package following the Preview 3.PR Type
What kind of change does this PR introduce?
Overview
This PR is used to track and implement new features and tweaks for the
Microsoft.Toolkit.Mvvm
package.See the linked issue for more info, and for a full list of changes included in this PR.
PR Checklist
Please check if your PR fulfills the following requirements:
Pull Request has been submitted to the documentation repository instructions. Link:Sample in sample app has been added / updated (for bug fixes / features)Icon has been created (if new sample) following the Thumbnail Style Guide and templates