how to inverse scrolling of zoom by mouse wheel

Sep 23, 2010 at 9:24 PM
Edited Sep 23, 2010 at 9:24 PM

Hi All

Could you please help me to inverse scrolling of zoom on mouse wheel (Windows.Form)

I used code for this:

 

private void MainMap_OnMapZoomChanged( )
        {
            decimal z;
            if((decimal) MainMap.Zoom > nudScale.Value)
            {
                if(MainMap.Zoom > 2)
                {
                    z = (decimal) MainMap.Zoom;
                    z -= 2;
                    nudScale.Value = z;
                }
                else
                {
                    nudScale.Value = 0;
                }                
            }
            else
                if((decimal) MainMap.Zoom < nudScale.Value)
                {
                    if(MainMap.Zoom < MainMap.MaxZoom -2)
                    {
                        z = (decimal) MainMap.Zoom;
                        z += 2;
                        nudScale.Value = z;
                    }
                    else
                    {
                        nudScale.Value = MainMap.MaxZoom;
                    }       
                }
        }

 

but in this way map is blinking on zooming (1 zoomIn + 2 zoomOut or 1 zoomOut+2 zoomIn).

Is there any way to do it?

Something like <MapControl1.MouseWheelZoomIn = Up|Down>  :)

 

Thanks for your assistance.

Sep 23, 2010 at 10:44 PM

done ;}

Sep 24, 2010 at 4:40 AM

Thank you radioman !!