Browse Source

OpenFilePickerAsync cant return null

pull/9903/head
Simon Cropp 4 years ago
parent
commit
4b1a5a28b1
  1. 7
      samples/ControlCatalog/ViewModels/ContextPageViewModel.cs

7
samples/ControlCatalog/ViewModels/ContextPageViewModel.cs

@ -56,12 +56,9 @@ namespace ControlCatalog.ViewModels
var result = await window.StorageProvider.OpenFilePickerAsync(new Avalonia.Platform.Storage.FilePickerOpenOptions() { AllowMultiple = true });
if (result != null)
foreach (var file in result)
{
foreach (var file in result)
{
System.Diagnostics.Debug.WriteLine($"Opened: {file.Name}");
}
System.Diagnostics.Debug.WriteLine($"Opened: {file.Name}");
}
}

Loading…
Cancel
Save