Hi,
I am sometimes seeing an issue with Window.ShowDialog()
where the window physically closes but does not return to the ShowDialog point in the code from where it was shown.
I have the following:
try
{
log.Debug("Showing new dialog window.");
result = dialogWindow.ShowDialog();
log.Debug("Closing new dialog window.");
}
finally
{
log.Debug("Resetting Opacity: " + this.ToString());
Opacity = 1;
Lock.Release(dialogWindowPadLock);
}
When the window tries to Close()
itself, it dissapears but the Opacity is not set back to 1 and the window is still recieveing KeyUp events but it is not physically displayed.
Has anyone seen anything like this before?
Cheers,
James
As requested, the method to close the window:
public override void EnterPressed(string input)
{
log.Info("User [" + username + "] successfully activated");
StopNextUserCheck();
ActivateUserExitReason = ExitReason.UserActivated;
Close();
// don't break as we don't want to add the dbp listener
return;
}