Use get window to get owner

This commit is contained in:
Jack251970 2025-04-15 12:21:56 +08:00
parent 309a710758
commit d21ffce47a
2 changed files with 3 additions and 2 deletions

View file

@ -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 =

View file

@ -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" />