Skip to content

Commit ee7ded1

Browse files
committed
add Owner Property
1 parent fedfc32 commit ee7ded1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ModernMessageBoxLib/QModernMessageBox.cs

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ namespace ModernMessageBoxLib
1010
/// </summary>
1111
public static class QModernMessageBox
1212
{
13+
/// <summary>
14+
/// Get or set the owner of the MessageBoxWindow
15+
/// </summary>
16+
public static System.Windows.Window ParentWindow { get; set; }
17+
1318
/// <summary>
1419
/// Get or set the text of the buttons
1520
/// The default value is in English. If you want other language, you should specify them manully
@@ -56,6 +61,7 @@ public static ModernMessageboxResult Show(string msg, string title, QModernMessa
5661
Background = GlobalBackground,
5762
Foreground = GlobalForeground,
5863
};
64+
msgBox.Owner = ParentWindow;
5965
switch (btns) {
6066
case QModernMessageBoxButtons.Ok:
6167
msgBox.Button1Text = MainLang.Ok;

0 commit comments

Comments
 (0)