public AddSprudelSuchePageState SaveState() { var state = new AddSprudelSuchePageState() { SearchText = this.SearchText, GeocodeResults = this.GeocodeResults.ToList(), SelectedGeocodeResultUniqueId = this.SelectedGeocodeResult != null ? this.SelectedGeocodeResult.UniqueId : "" }; return state; }
public void LoadState(AddSprudelSuchePageState state) { SearchText = state.SearchText; GeocodeResults = new ObservableCollection<GeocodeResult>(state.GeocodeResults); if (!String.IsNullOrWhiteSpace(state.SelectedGeocodeResultUniqueId)) { SelectedGeocodeResult = GeocodeResults.FirstOrDefault(r => r.UniqueId == state.SelectedGeocodeResultUniqueId); } }