The code I use is as follows:
Telerik.Windows.Controls.Map.
Pushpin pin = new Telerik.Windows.Controls.Map.Pushpin();
FacLocation status = (FacLocation)e.UserState; ;
if (status.Status == "01")
{
pin.Background =
new SolidColorBrush(Colors.Blue);
}
if (status.Status == "02")
{
pin.Background =
new SolidColorBrush(Colors.Purple);
}
if (status.Status == "03")
{
pin.Background =
new SolidColorBrush(Colors.Green);
}
ToolTipService.SetToolTip(pin, tip);
Telerik.Windows.Controls.Map.
Location loc = new
Telerik.Windows.Controls.Map.
Location();
loc.Latitude = lat;
loc.Longitude = lon;
pin.Loaded +=
new RoutedEventHandler(pin_Loaded);
MapLayer.SetLocation(pin, loc);
layer.Items.Add(pin);
//////////////
This code worked fine with the SilverLight 4 assemblies, but has no effect in Silverlight 3, all the pins just come up with a red background. I have debugged the code and it seems to be correctly setting each pushpin's background as they are added to the map. Can anyone tell me how to dynamically reset the background color of the pushpins, using the Silverlight 3 assemblies?
Thanks,
Alec von Brand