From what I understand, you are using 2 Windows (1 as main and the other as a child with owner property set to mainWindow).
When MessageBox's Yes button is clicked, the window child should close and set focus back to window main.
Have you tried the following when MessageBox returns a "Yes" :
You could also not use the property Owner on the window child.
You could also try to use a WindowContainer from the toolkit. You will be able to add ChildWindows or MessageBoxes in it. But no "Owner" property will be available for the childWindows.
When MessageBox's Yes button is clicked, the window child should close and set focus back to window main.
Have you tried the following when MessageBox returns a "Yes" :
if( result == MessageBoxResult.Yes )
{
if( windowChild != null )
{
windowChild .Owner.Focus();
windowChild .Close();
}
}
It should put the focus on the parent of the window child : the Window main.You could also not use the property Owner on the window child.
You could also try to use a WindowContainer from the toolkit. You will be able to add ChildWindows or MessageBoxes in it. But no "Owner" property will be available for the childWindows.