private void EditionBien_click(object sender, RoutedEventArgs e) { if (((ServiceAgence.BienImmobilierBase)mListBox.SelectedItem) == null) { this.Bien = null; return; } EditerBien window = new EditerBien(this.Bien); window.ShowDialog(); refresh(); }