Hi. i am trying build my first application in avalonia with button which opens FileDialog. Then I click on the button, in axaml InvokeCommandAction is triggered and thereafter program opens ReactiveCommand. My code looks like this
async void RunOpenFile(string parameter)
{
if (Avalonia.Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
OpenFileDialog openFileDialog = new OpenFileDialog
{
Title = "Choose Images",
};
openFileDialog.Filters.Add(new FileDialogFilter { Name = "Images", Extensions = { "jpg", "png", "tif" } });
await openFileDialog.ShowAsync( desktop.MainWindow);
}
}
But my application just closes without any exceptions.
Hi. i am trying build my first application in avalonia with button which opens FileDialog. Then I click on the button, in axaml InvokeCommandAction is triggered and thereafter program opens ReactiveCommand. My code looks like this
But my application just closes without any exceptions.
OS: Ubuntu 20.04 FW: NET5 Avalonia version: 0.10.6
I will be glad for any help