public string Foo() { if (selected != null) { return(selected.Value.ToString()); } elementOfGrid temp = (elementOfGrid)EG.SelectedItem; return(temp.Value.ToString()); }
private void Row_DoubleClick(object sender, MouseButtonEventArgs e) { selected = (elementOfGrid)EG.SelectedItem; this.Close(); }