I've got Windows.Forms.Form
and showing it I set a WPF RibbonWindow
to its parent
public DialogResult ShowDialog(IWin32Window owner)
{
DialogResult returnDialogResult = DialogResult.Cancel;
DummyForm form = new DummyForm(this);
form.Show(owner);
...
form.Close();
return returnDialogResult;
}
After the form.Close()
method form closes, but the parent window losts its focus and becomes hided.
Calling the Focus()
or the Activate()
method of that parent window after that ShowDialog(IWin32Window) method doesn't solve the problem, the main window still hided.
How can I set active and visible the main window?