示例#1
0
        //-----------------------------------------------------------------------
        private double GetKeyframeWidth(KeyframeItem keyframe)
        {
            double pixelsASecond = ActualWidth / TimelineItem.TimelineRange;

            if (keyframe.Duration > 0f)
            {
                return(keyframe.Duration * pixelsASecond);
            }

            var preview = keyframe.GetImagePreview();

            if (preview != null)
            {
                return(ActualHeight - 20);
            }
            else
            {
                return(10);
            }
        }