Can you tell me what is wrong with this.. and how I can show the busy indicator when loading map data.. thanks
private void LoadData()
{
this.radBusy.IsBusy = true;
DataCRMDataContext dc = new DataCRMDataContext();
var query = from i in dc.VACTIVEREPs
where i.RepID > 0
select i;
List<CRM_GIS.VACTIVEREP> lstVActiveReps = query.ToList();
foreach (VACTIVEREP Rep in lstVActiveReps)
{
var pushpin = new Pushpin();
pushpin.Background = System.Windows.Media.
Brushes.Red;
pushpin.ToolTip = Rep.LastName +
", " + Rep.FirstName + " " + Rep.RepNo;
MapLayer.SetLocation(pushpin, new Location(Convert.ToDouble(Rep.lat), Convert.ToDouble(Rep.lng)));
pushpin.MouseDoubleClick +=
new MouseButtonEventHandler(pushpin_MouseDoubleClick);
pushpin.MouseDown +=
new MouseButtonEventHandler(pushpin_MouseDown);
this.informationLayer.Items.Add(pushpin);
}
this.radBusy.IsBusy = false;
}