I have a created a custom context menu using ICommandBar
and am displaying it on create feature mouse-down right click. I am constructing a point collection on each mouse down and then creating a polyline. For each point I am refreshing using EditSketch.RefreshSketch()
.
On right click, I created a custom context menu to finish the sketch. Sometimes, I get the default "Sketch Tool/Select Elements" context menu, which I do not want to get on right click.
The code that I'm using to display the context menu:
public override void OnMouseDown(int Button, int Shift, int X, int Y)
{
if (Button == 2)
{
_objContextMenu.Popup(0, 0);
}
}