fixed a bug of MessageBox
This commit is contained in:
1 parent
42f17c4626
commit
4872b8e25c
3 files changed
+7
-7
No files matched your search
@@ -267,7 +267,7 @@ namespace HandyControl.Controls
|
||||
MessageBox messageBox = null;
|
||||
Application.Current.Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
messageBox = CreateMessageBox(null, info.MessageBoxText, info.Caption, info.Button, MessageBoxImage.None, info.DefaultResult);
|
||||
messageBox = CreateMessageBox(null, info.Message, info.Caption, info.Button, MessageBoxImage.None, info.DefaultResult);
|
||||
SetButtonStatus(messageBox, info.Button);
|
||||
|
||||
if (!string.IsNullOrEmpty(info.IconKey))
|
||||
@@ -277,9 +277,9 @@ namespace HandyControl.Controls
|
||||
messageBox.ImageBrush = ResourceHelper.GetResource<Brush>(info.IconBrushKey);
|
||||
}
|
||||
|
||||
if (info.Style != null)
|
||||
if (info.StyleKey != null)
|
||||
{
|
||||
messageBox.Style = info.Style;
|
||||
messageBox.Style = ResourceHelper.GetResource<Style>(info.StyleKey);
|
||||
}
|
||||
SystemSounds.Asterisk.Play();
|
||||
messageBox.ShowDialog();
|
||||
|
||||
Reference in new issue
Block a user