I would expect the guague control to automatically support certain behavior. Like clicking and draging a marker (needle) in a Linear Gauge.
How do I get this behavior? Do I have to code up all the mouse event handlers, etc..?
I am looking for the same thing. Can anyone provide at least a simple demo for this?
Thanks.
I could not wait any longer for a reply. This looks like an unsupported, incomplete (not to mention buggy dev interface that crashes) product. I purchased Dundas Guage, very powerful and robust.
Which events need handling to get this behavior? I have gone through the events, and cannot figure it out.
please run this form for a demonstration.
using Infragistics.UltraGauge.Resources;
using Infragistics.Win.UltraWinGauge;
using System;
using System.Windows.Forms;
public class Form1 : Form
{
private UltraGauge ultraGauge1;
this.ultraGauge1.Dock = DockStyle.Fill;
LinearGauge lin = new LinearGauge();
linearScale.StartExtent = 10.0;
linearScale.EndExtent = 90.0;
linearScale.MajorTickmarks.StrokeElement.Color = Color.Black;
axis.StartValue = 0.0;
axis.EndValue = 10.0;
axis.TickmarkInterval = 1.0;
needle.Value = 3.14;
lin.Scales.Add(linearScale);
linearScale.Axis = axis;
linearScale.Markers.Add(needle);
this.ultraGauge1.MouseMove += new MouseEventHandler(this.ultraGauge1_MouseMove);
this.ultraGauge1.MouseUp += new MouseEventHandler(this.ultraGauge1_MouseUp);
}
private LinearGaugeNeedle DraggingNeedle { get; set; }
this.DraggingNeedle.Value =
this.DraggingNeedle = null;
I too was looking for this. I was really hoping to see something along the lines of
needle.ValueChangedHandler += myValueChangedHandler(object sender, ValueChangedEventArgs e );
Any chance to see this in a future version?
the UltraGauge control has a MarkerValueChanged event.
Does that mean that all the code posted by David Negley is not necessary?
I will try this today.
Thanks
This is a unique need.
it is necessary if you want to make needles draggable on a linear gauge.