private void NewLandmarkType_OnClick(object sender, RoutedEventArgs e) { if (ltw == null) { ltw = new ListTypesWindow(map); ltw.Show(); } else { ltw.Topmost = true; // important ltw.Topmost = false; // important ltw.Focus(); // important } }
private void NewType_OnClick(object sender, RoutedEventArgs e) { if (ltw == null) { ltw = new ListTypesWindow(map, this); ltw.Show(); if (ChosenType != null) { ltw.LTID.Text = ChosenType.TypeView; } } else { ltw.Topmost = true; // important ltw.Topmost = false; // important ltw.Focus(); // important } }