Heat Map layer
Inheritance: DynamicLayer, ILegendSupport, ISupportsDynamicImageByteRequests
Beispiel #1
0
        /// <summary>
        /// GradientProperty property changed handler.
        /// </summary>
        /// <param name="d">HeatMapLayer that changed its Gradient.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs.</param>
        private static void OnGradientPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HeatMapLayer dp = d as HeatMapLayer;

            dp.OnLayerChanged();
            dp.OnLegendChanged();
        }
Beispiel #2
0
        /// <summary>
        /// IntervalProperty property changed handler.
        /// </summary>
        /// <param name="d">HeatMapLayer that changed its Interval.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs.</param>
        private static void OnIntensityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if ((double)e.NewValue < 1)
            {
                throw new ArgumentOutOfRangeException("Intensity", Properties.Resources.HeatMapLayer_IntensityLessThanOne);
            }
            HeatMapLayer dp = d as HeatMapLayer;

            if (dp.IsInitialized)
            {
                if (dp.timer == null)
                {
                    dp.timer = new System.Windows.Threading.DispatcherTimer()
                    {
                        Interval = TimeSpan.FromMilliseconds(50)
                    };
                    dp.timer.Tick += (s, e2) =>
                    {
                        dp.timer.Stop();
                        dp.OnLayerChanged();
                    };
                }
                dp.timer.Stop();
                dp.timer.Start();
            }
        }