You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest version of Avalonia and its dependencies (11.2.0), the file src/Avalonia.Samples/ViewInteraction/MvvmDialogSample/Views/InteractionView.axaml.cs fails to compile, returning Error CS1503.
As a workaround, downgrading the NuGet packages to version 11.1.0 resolves the issue.
The text was updated successfully, but these errors were encountered:
@BiDuang thanks for reporting this. Indeed, there was a change in ReactiveUI that I wasn't aware of. I filed a PR to fix it, however we are checking with the team if we need to revert this change or not.
Sorry for the inconvinience.
public partial class InteractionView : ReactiveUserControl<InteractionViewModel>
{
public InteractionView()
{
InitializeComponent();
this.WhenActivated(d =>
{
- d(ViewModel.SelectFilesInteraction.RegisterHandler(this.InteractionHandler));+ d(ViewModel!.SelectFilesInteraction.RegisterHandler(this.InteractionHandler));
});
}
- private async Task InteractionHandler(InteractionContext<string?, string[]?> context)+ private async Task InteractionHandler(IInteractionContext<string?, string[]?> context)
{
// Get our parent top level control in order to get the needed service (in our sample the storage provider. Can also be the clipboard etc.)
var topLevel = TopLevel.GetTopLevel(this);
var storageFiles = await topLevel!.StorageProvider
.OpenFilePickerAsync(
new FilePickerOpenOptions()
{
AllowMultiple = true,
Title = context.Input
});
- context.SetOutput(storageFiles?.Select(x => x.Name).ToArray());+ context.SetOutput(storageFiles.Select(x => x.Name).ToArray());
}
}
Describe the bug
Sample affected
MvvmDialogSample
Proposed solution
With the latest version of Avalonia and its dependencies (11.2.0), the file src/Avalonia.Samples/ViewInteraction/MvvmDialogSample/Views/InteractionView.axaml.cs fails to compile, returning Error CS1503.
As a workaround, downgrading the NuGet packages to version 11.1.0 resolves the issue.
The text was updated successfully, but these errors were encountered: