private void PrepareReset(Size availableSize)
        {
            this.radiusScale = RadRadialGauge.GetIndicatorRadiusScale(this);
            this.center      = new Point(availableSize.Width / 2, availableSize.Height / 2);
            this.radius      = Math.Min(availableSize.Width, availableSize.Height) / 2;

            var gauge          = this.Owner.OwnerGauge as RadRadialGauge;
            var gaugeMinAngle  = gauge.MinAngle;
            var gaugeMaxAngle  = gauge.MaxAngle;
            var physicalLength = gaugeMaxAngle - gaugeMinAngle;
            var logicalLength  = Math.Abs(this.Owner.OwnerGauge.MaxValue - this.Owner.OwnerGauge.MinValue);

            var logicalStartValue = this.StartValue - this.Owner.OwnerGauge.MinValue;
            var startValueAngle   = RadGauge.MapLogicalToPhysicalValue(logicalStartValue, physicalLength, logicalLength);
            var actualValueAngle  = RadGauge.MapLogicalToPhysicalValue(this.ActualValue - this.Owner.OwnerGauge.MinValue, physicalLength, logicalLength);

            this.minAngle = gaugeMinAngle + startValueAngle;
            this.maxAngle = gaugeMinAngle + actualValueAngle;
        }
        private void ArrangeRadially(double angle, Point center, double radius)
        {
            Point location = RadialGaugePanel.CreateRotatedPoint(angle, radius, center, RadRadialGauge.GetIndicatorRadiusScale(this));

            Canvas.SetLeft(this.visualElement, location.X);
            Canvas.SetTop(this.visualElement, location.Y);
        }
Example #3
0
 private void PrivateUpdate()
 {
     this.radiusScale = RadRadialGauge.GetIndicatorRadiusScale(this);
     this.UpdateAngleRestrictions();
 }