Demo1-Double Click

Hi,
I am trying to implement a stroke feature similar to that in Demo1. However, I would like to stop drawing the stroke when the user double clicks.
I tried to track the LastInput.DoubleClick property in DoMouseDown. However, this always returns false.
This behavior is true for Demo1 also. In the Demo1 code, if one tries to track the LastInput.DoubleClick propertry, it always returns false.

public override void DoMouseDown() {
if (myStroke == null) {
// create a new stroke starting at the first mouse down point
myStroke = new GoStroke();
myStroke.AddPoint(this.FirstInput.DocPoint);
// the stroke is temporarily a view object
this.View.Layers.Default.Add(myStroke);
}

if(this.LastInput.DoubleClick)
{
//add stroke to document and return
}
myStroke.AddPoint(this.LastInput.DocPoint);
}
Can anyone please tell me what I am missing?

Thanks,
Rafique

I haven’t had the chance to look into this. Could you see if the value of LastInput.MouseEventArgs.Clicks is greater than 1, at the time you expect a double-click to have occurred?

LastInput.MouseEventArgs.Clicks = 1, in case of a double click.
–Rafique

OK, so that means Windows Forms isn’t telling us that’s a double-click. You’ll need to keep track of the time of each click to decide whether it’s a double click or not. I suppose that’s something we ought to do some day…