In my project the Xceed.Wpf.Toolkit
is used.
I'm using MVVM i have a MainView.xaml
and all other views are UserControl
s
I'm trying to show a message box from the code behind of my UserControl
the message dialog parent is not set to it.
I will invoke dialog message when my viewmode
l requires.
UserControl.Xaml.cs
private void DialogMessageRecieved(DialogMessage dialMessage)
{
switch (dialMessage.Caption)
{
case "Warning":
Xceed.Wpf.Toolkit.MessageBox.Show(App.Current.MainWindow, dialMessage.Content, "Warning", dialMessage.Button, dialMessage.Icon);
//i noticed that if i use native message box it works,
//by my app fully is implemented by Xceed
MessageBox.Show(App.Current.MainWindow,
dialMessage.Content, "Warning", dialMessage.Button, dialMessage.Icon);
break;
}
}
When a message box is shown, user switch to another app and come back the application the message box is hidden , it will only be shown after i press ALT + TAB
Fixed issue by downgrading toolkit to Extended.Wpf.Toolkit -Version 2.3.0
There was issue Since v2.4, for the toolkit "the MessageBox
owner is not applied".