Hi everyone. I have a Silverlight application that displays a map, and my intention is, when I mouse over a specific location in the map, the information about this location gets displayed somehow in the app. What I've done so far is to link the silverlight app to a webservice that retrieves this information for me, but now I'm stuck, and don't know how to proceed. I was following this tutorial., but when the tutorial wants to retrieve a list, I want to retrieve a single object. I was trying to use the datagrid, but I think it was not designed to perform what I want. I need some enlightment to tell me how to proceed.
Well ... I'll edit the code to show what problem I'm having. My code behind have this two methods:
private void MouseOverHarbor(object sender, RoutedEventArgs e)
{
Ellipse thisPath = (Ellipse)sender;
thisPath.Stroke = mySolidColorBrush;
DataRetrieverReference.Service1Client webService = new DataRetrieverReference.Service1Client();
webService.GetDataCompleted += new EventHandler<DataRetrieverReference.GetDataCompletedEventArgs>(webService_GetDataCompleted);
webService.GetDataAsync((int)thisPath.DataContext);
}
void webService_GetDataCompleted(object sender, DataRetrieverReference.GetDataCompletedEventArgs e)
{
NameField.Text = "Works";//No, it doesnt!
}
What I can see is that the event handler is never reached, but I don't know why. I just used the same code the tutorials taught, but I didn't achieve my goal yet. Am I missing something?