From d21ffce47af56b25bbf14e36d7b475ce3e7f4689 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 15 Apr 2025 12:21:56 +0800 Subject: [PATCH] Use get window to get owner --- .../SettingPages/ViewModels/SettingsPanePluginsViewModel.cs | 4 ++-- Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs index 916fd1ece..de7cf15c3 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginsViewModel.cs @@ -111,11 +111,11 @@ public partial class SettingsPanePluginsViewModel : BaseModel .ToList(); [RelayCommand] - private async Task OpenHelperAsync() + private async Task OpenHelperAsync(Button button) { var helpDialog = new ContentDialog() { - Owner = Application.Current.MainWindow, + Owner = Window.GetWindow(button), Content = new StackPanel { Children = diff --git a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml index f9f708314..f3d630306 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml @@ -57,6 +57,7 @@ Height="34" Margin="0 0 20 0" Command="{Binding OpenHelperCommand}" + CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Content="" FontFamily="{DynamicResource SymbolThemeFontFamily}" FontSize="14" />