Select to view content in your preferred language

Pan Using Arrow Keys

1003
2
04-06-2011 05:37 AM
PaulHuppé
Deactivated User
Hi,

I would like to capture the keypress of the keyboard arrows and use those to perform pan operations in the desired key direction.  How do I do that?

Paul
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Map Navigation using KeyDown events is already done for you. You can try this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Map. Click on the map to give it focus or wire up to Map.Loaded event and place the following code:
private void MyMap_Loaded(object sender, RoutedEventArgs e)
{
       MyMap.Focus();
}


Notice that the following keys perform navigation (Key.Down/Up/Left/Right/Subtract/Add).
0 Kudos
PaulHuppé
Deactivated User
Hi Jennifer,

That is great, I did not know that.

Thanks,
Paul
0 Kudos