Describe the bug 🐞
AvaloniaCreatesCommandBinding throws if command is null:
https://github.com/reactiveui/ReactiveUI.Avalonia/blob/main/src/ReactiveUI.Avalonia/AvaloniaCreatesCommandBinding.cs#L76
While default impl does not:
https://github.com/reactiveui/ReactiveUI/blob/main/src/ReactiveUI/Bindings/Command/CreatesCommandBindingViaCommandParameter.cs#L85
Step to reproduce
In view:
this.BindCommand(ViewModel, x => x.LeCommand, x => x.Btn);
And example view model:
using System.Windows.Input;
using ReactiveUI;
namespace ReactiveUIDemo.ViewModels
{
internal class FooViewModel : ReactiveObject, IRoutableViewModel
{
public FooViewModel(IScreen screen) => HostScreen = screen;
public string UrlPathSegment => "Foo";
public IScreen HostScreen { get; }
public ICommand? LeCommand { get; }
}
}
Reproduction repository
https://github.com/reactiveui/ReactiveUI
Expected behavior
ViewModel's null command property should be set in the control
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
ReactiveUI.Avalonia Version
No response
Additional information ℹ️
No response
Describe the bug 🐞
AvaloniaCreatesCommandBinding throws if command is null:
https://github.com/reactiveui/ReactiveUI.Avalonia/blob/main/src/ReactiveUI.Avalonia/AvaloniaCreatesCommandBinding.cs#L76
While default impl does not:
https://github.com/reactiveui/ReactiveUI/blob/main/src/ReactiveUI/Bindings/Command/CreatesCommandBindingViaCommandParameter.cs#L85
Step to reproduce
In view:
And example view model:
Reproduction repository
https://github.com/reactiveui/ReactiveUI
Expected behavior
ViewModel's null command property should be set in the control
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
ReactiveUI.Avalonia Version
No response
Additional information ℹ️
No response