Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Change Needle Location Programmatically?
posted

I need to set the location of my needle marker programmatically when the page gets loaded.  The help files say to use:

RadialGauge myRadialGauge = this.ultraGauge1.Gauges[0] as RadialGauge;

// Access Needle marker
RadialGaugeMarker myMarker = myRadialGauge.Scales[0].Markers[0];
int currentValue = (int)myMarker.Value;

// Increase needle by 5
myMarker.Value = currentValue + 5;

Scales (bolded above), however, does not show up when I try to recreate this code any my project.  What am I missing?

Parents
No Data
Reply
  • 220
    posted

    Again, answered my own question...

    Found a better example that shows that you have to cast the object as a RadialGauge like so

    RadialGaugeScale scale = ((RadialGauge)this.UltraGauge1.Gauges[0]).Scales[0];

Children
No Data