I have been through the samples for desktopedition for cancelling tracking using the esc key. It may be just my application for some reason, but using either PreviewKeyDown or KeyDown methods I am not able to capture the esc OR the enter keys. Almost all other keys are captured using those event handlers. Does anyone know how, in WPF and WPFDesktopEdition to capture the esc or enter keys?
I try to capture both on the map level and the window level:
On WindowLoaded:
myMap.PreviewKeyDown += new KeyEventHandler(myMap_PreviewKeyDown);
this.PreviewKeyDown += new KeyEventHandler(MapGIS_PreviewKeyDown);
void MapGIS_PreviewKeyDown(object sender, KeyEventArgs e)
{
throw new NotImplementedException();
}
void myMap_PreviewKeyDown(object sender, KeyEventArgs e)
{
throw new NotImplementedException();
}