fix opening dialogs.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterViewModel.cs
using Avalonia;
using Avalonia.Controls;
+using Avalonia.Controls.ApplicationLifetimes;
using AvalonStudio.Documents;
using AvalonStudio.Extensibility;
using NBitcoin;
@@ -85,7 +86,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Title = "Import Transaction"
};
- var selected = await ofd.ShowAsync(null, fallBack: true);
+ var window = (Application.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime).MainWindow;
+ var selected = await ofd.ShowAsync(window, fallBack: true);
if (selected != null && selected.Any())
{
var path = selected.First();

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/TransactionViewerViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/TransactionViewerViewModel.cs
using Avalonia;
using Avalonia.Controls;
+using Avalonia.Controls.ApplicationLifetimes;
using NBitcoin;
using ReactiveUI;
using System;
@@ -78,7 +79,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
sfd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
}
- string fileFullName = await sfd.ShowAsync(null, fallBack: true);
+ var window = (Application.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime).MainWindow;
+ string fileFullName = await sfd.ShowAsync(window, fallBack: true);
if (!string.IsNullOrWhiteSpace(fileFullName))
{
var ext = Path.GetExtension(fileFullName);

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
using Avalonia;
using Avalonia.Controls;
+using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Threading;
using AvalonStudio.Extensibility;
using AvalonStudio.Shell;
@@ -97,7 +98,8 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
ofd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
}
- var selected = await ofd.ShowAsync(null, fallBack: true);
+ var window = (Application.Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime).MainWindow;
+ var selected = await ofd.ShowAsync(window, fallBack: true);
if (selected != null && selected.Any())
{
var path = selected.First();

fix opening dialogs.