public void ShowInfoForm() { if (infoForm == null) { infoForm = new WpfFormLibrary.InfoForm(); infoForm.Closed += infoForm_Closed; // avoid reshowing a disposed form ElementHost.EnableModelessKeyboardInterop(infoForm); infoForm.Show(); } else { infoForm.Activate(); } }
private void infoForm_Closed(object sender, EventArgs e) { infoForm = null; }