HELP!!! Custom Label for Radial Gauge

2 posts, 0 answers
  1. James
    James avatar
    44 posts
    Member since:
    Jan 2012

    Posted 04 Mar 2012 Link to this post

    I need to be able to add a Custom Label to a Radial Gauge that will contain text indicating the status of the value being presented.  I am using the WPF Q2 2011 gauges and because of a time crunch I will not be able to upgrade the gauges to a newer version.  I know that the next version of gauge has this ability.  Please if anyone knows how to add a text label as indicated I need to know this quickly.  Thank you for your time and consideration on this question.

  2. Andrey
    Andrey avatar
    1681 posts

    Posted 08 Mar 2012 Link to this post

    Hello James,

    You can use the CustomTickMark element to show the label of the value. I would recommend to create additional scale which will contain this element for ability to set the label properties like Location separately. The sample code is below.
    private void CreateRadialGaugeWithValueLabel()
        RadialGauge gauge = new RadialGauge();
        RadialScale radialScale = new RadialScale()
            Label = new LabelProperties()
                Location = ScaleObjectLocation.Inside
        RadialScale customTickMarkScale = new RadialScale()
            MajorTicks = -1,
            Label = new LabelProperties()
                Location = ScaleObjectLocation.Outside
        Marker marker = new Marker()
            Location = ScaleObjectLocation.OverCenter,
            RelativeWidth = 0.1,
            RelativeHeight = 0.1,
            Value = 85
        CustomTickMark tick = new CustomTickMark()
            Format = "{0:F2}",
            Template = null
        Binding binding = new Binding();
        binding.Source = marker;
        binding.Path = new PropertyPath("Value");
        tick.SetBinding(CustomTickMark.ValueProperty, binding);

    Andrey Murzov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top