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.
sorry you couldn't get a response in time. in the future, if you are using an infragistics product and need a prompt response, please use an official support channel (i.e. Developer Support). they have a guaranteed response and very quick turnaround, unlike these peer-to-peer forums.
http://es.infragistics.com/gethelp
as for needle dragging on linear gauges, this is not yet available as a feature of linear gauges -- radial gauge needles do have an AllowDrag property, but the feature is still not implemented for linear gauges. you can still achieve this behavior through event handling, though.
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;
This is a unique need.
it is necessary if you want to make needles draggable on a linear gauge.
Does that mean that all the code posted by David Negley is not necessary?
I will try this today.
Thanks
the UltraGauge control has a MarkerValueChanged event.
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?