Best practices to re-use non-modal dialog #244
-
I hope this is the right forum for questions about the usage of mvvm-dialogs. private void ShowLog()
{
if (alDlg == null)
{
alDlg = new AlarmLogDialogViewModel();
dialogService.Show(this, alDlg);
}
else
{
dialogService.Activate(alDlg);
}
} However, that didn't result in the dialog to be shown after minimizing it and I changed the else part to this: var tmp = dialogService.Close(alDlg);
dialogService.Show(this, alDlg); Is this the right approach? Great project by the way. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It might be, I don't think we've got support to bring minimized windows to the forefront if |
Beta Was this translation helpful? Give feedback.
It might be, I don't think we've got support to bring minimized windows to the forefront if
Activate
isn't doing it for you. Your solution is a sound one, another alternative could be that you create a new interface inheritingIDialogService
that has this new method that is capable of doing what you want, and then you will have to create your own class that inherits from bothDialogService
and this new interface you created, and then you can implement your logic there. I haven't tested it myself, it's just an idea.