private static void MarkerItemSourceChangeCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TimedStateMarkerDisplay instance = d as TimedStateMarkerDisplay;
            var oldValues = e.OldValue as IEnumerable <AnimatedKeyframeViewModel>;

            if (oldValues != null)
            {
                foreach (var item in oldValues)
                {
                    item.PropertyChanged -= instance.HandleItemPropertyChanged;
                }
            }

            var newValues = e.NewValue as IEnumerable <AnimatedKeyframeViewModel>;

            if (newValues != null)
            {
                foreach (var item in newValues)
                {
                    item.PropertyChanged += instance.HandleItemPropertyChanged;
                }
            }
            instance.RefreshRectangles();
        }
        private static void RangePropertyChangeCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            TimedStateMarkerDisplay display = d as TimedStateMarkerDisplay;

            display.RefreshRectangles();
        }