Hi,
I am trying to figure out how I can add code to allow the user to press the enter key after entering an address and begin the address search. I think I need to use the keydown event, but not sure. Thanx.
I saw this code:
private void TextBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == System.Windows.Input.Key.Enter)
System.Diagnostics.Debug.WriteLine(e.Key);
}
here is the LocatorButton_click
private void LocatorButton_Click(object sender, RoutedEventArgs e)
{
this.IsBusy = true; // Make Busy Signal Visible
if (locatorRadio_Address.IsChecked.Value && !string.IsNullOrEmpty(txtAddress.Text))
{
AddressHelper addressParser = new AddressHelper(txtAddress.Text);
geocodeTool.GeocodeAddress(addressParser.Street1, addressParser.City, addressParser.State, addressParser.ZipCode, addressParser.Country);
}
else if (locatorRadio_Coords.IsChecked.Value && !string.IsNullOrEmpty(txtLongitude.Text) && !string.IsNullOrEmpty(txtLatitude.Text))
{
double lon = double.Parse(txtLongitude.Text);
double lat = double.Parse(txtLatitude.Text);
MapPoint point = new MapPoint(lon, lat, new SpatialReference(4326));
geocodeTool.ReverseGeocode(point);
}
}