Completed
Last Updated: 15 Aug 2017 10:20 by ADMIN
ADMIN
Dimitar
Created on: 17 Feb 2017 07:12
Category: RadialGauge, LinearGauge, BulletGraph
Type: Bug Report
1
FIX. RadRadialGauge - exception when hovering over the gauge and some of the single labels are not visible.
The attached video shows how this can be reproduced.

Workaround:
class MyLabel : RadialGaugeSingleLabel
{
    private RadRadialGaugeElement owner;
    protected override void OnParentChanged(RadElement previousParent)
    {
        base.OnParentChanged(previousParent);
        this.owner = (RadRadialGaugeElement) this.Parent;
    }
    public override GraphicsPath Path
    {
        get
        {
            GraphicsPath path = new GraphicsPath();
            float fontSizePercentage = this.Font.Size;
            var gaugeSize = (RectangleF)this.owner.GetType().GetProperty("GaugeSize", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.owner, null)  ;

            if (this.AutoSize)
            {
                fontSizePercentage = (gaugeSize.Width) * (this.LabelFontSize / 100f);
                if (fontSizePercentage <0)
                {
                    return path;

                }
            }
            return base.Path;
        }
    }
}
Attached Files:
0 comments