Changes to make colorLegend work as expected in Silverlight