-
Notifications
You must be signed in to change notification settings - Fork 38
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] RoutedCommand
#21
[Feature] RoutedCommand
#21
Conversation
2402e69
to
c715bd1
Compare
644fa5b
to
af10767
Compare
private static readonly WeakReference<IInputElement?> _inputElement = | ||
new WeakReference<IInputElement?>(default); | ||
|
||
internal static event EventHandler? Invalidate = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be public and named RequerySuggested?
Similarly to https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs#L38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this event
|
||
namespace Avalonia.Labs.Input | ||
{ | ||
public sealed class RoutedCommandBinding : AvaloniaObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WPF CommandBinding is a bit different, where you set original ICommand and has CanExecute + Executed events.
It can be confusing when porting code from WPF, as in this PR RoutedCommandBinding.Command is actually target command, that gets executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed Command to ExecutingCommand
Experimenta implemtation of
RoutedCommand
like WPF.the currently supported flow is this:
Get Started
Install package
Add XML Namespace
Define your's RouterCommands
Assing your
RotedCommand
Binding
RouterCommand
to your's ViewModelTodo