private static void OnIntensityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if ((int)e.NewValue < 1)
{
//TODO:Resource
//throw new ArgumentOutOfRangeException("Radius");
throw new ArgumentOutOfRangeException(ExceptionStrings.RadiusLessThanOne);
}
HeatMapLayer layer = d as HeatMapLayer;
if (layer.IsInitialized)
{
if (layer.timer == null)
{
layer.timer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(50.0) };
layer.timer.Tick += (s1, e1) =>
{
layer.timer.Stop();
layer.OnLayerChanged();
};
}
layer.timer.Stop();
layer.timer.Start();
}
layer.OnLayerChanged();
}