Ejemplo n.º 1
0
        public void UpdatePosition(Point mousePosition, double minX, double maxX)
        {
            Translate.X = MathUtility.Clamp(mousePosition.X - _CapturedLocalPosition.X, minX, maxX);
            Translate.Y = MathUtility.Clamp(mousePosition.Y - _CapturedLocalPosition.Y, ComputeOffset.Y, LimitedYPos);

            var v = GetControlValue(new Point(Translate.X, Translate.Y), ActualAreaSize, Delta);

            ControlValue.Value          = v.Value;
            ControlValue.NormalizedTime = v.NormalizedTime;

            RangeControlPoint.UpdateTime();

            InvalidateVisual();
        }
Ejemplo n.º 2
0
        public DefaultControlPoint(ControlValue value, float delta, float maxWidth, float maxHeight)
        {
            ControlValue = value;

            Delta          = delta;
            ActualAreaSize = new Size(maxWidth, maxHeight);

            var transformGroup = new TransformGroup();

            transformGroup.Children.Add(Translate);

            RenderTransform       = transformGroup;
            RenderTransformOrigin = new Point(0.5, 0.5);

            RangeControlPoint = new RangeControlPoint(this);

            Placement();
        }