Disable double click zoom

348
1
03-06-2012 09:43 AM
LuisGarcia2
Occasional Contributor II
I am doing a custom program and I need to do something other than zooming with the double click. How do I disable that?
Thanks!
0 Kudos
1 Reply
wangzhifang
Occasional Contributor
This is a discussed issue, try the following code:
private void MyMap_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!(_datetime.Hour == 0 && _datetime.Minute == 0 && _datetime.Second == 0))//not dive in on the first time
            {
                if (DateTime.Compare(_datetime.AddMilliseconds(500),DateTime.Now)>0)//the interval of two clicks is smaller than 0.5s
                {
                    e.Handled = true;
                }
            }
            _datetime = DateTime.Now;
        }

and the ref link:http://forums.esri.com/Thread.asp?c=158&f=2455&t=301837
0 Kudos