public void OverlayOk() { if (_errored) { // Clear overlay and allow re-submit if an error occured. OverlayControl = null; } else { // If the overlay was a success overlay, switch back to login. ParentVM.SwitchToLogin(); } }