# ExtentInteractiveOverlay in WPF

**URL:** <https://community.thinkgeo.com/t/extentinteractiveoverlay-in-wpf/3163>\
**Category:** WPF\
**Created:** [February 29, 2012, 2:11pm UTC](https://community.thinkgeo.com/t/extentinteractiveoverlay-in-wpf/3163 "2012-02-29T14:11:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Cody](https://community.thinkgeo.com/u/Cody)\
**Post date:** [February 29, 2012, 2:11pm UTC](https://community.thinkgeo.com/t/extentinteractiveoverlay-in-wpf/3163/1 "2012-02-29T14:11:16Z")

</div>

Firstly,&nbsp;the&nbsp;LeftClickDragKey&nbsp;property&nbsp;is&nbsp;a&nbsp;System.Windows.Forms&nbsp;Key&nbsp;object.&nbsp;Is&nbsp;this&nbsp;on&nbsp;purpose?&nbsp;Why&nbsp;aren't&nbsp;we&nbsp;using&nbsp;System.Windows.Input?&nbsp;I&nbsp;would&nbsp;like&nbsp;not&nbsp;to&nbsp;reference&nbsp;any&nbsp;win&nbsp;forms&nbsp;things.

edit:

Apparently&nbsp;if&nbsp;you&nbsp;set&nbsp;the&nbsp;LeftClickDragKey&nbsp;to&nbsp;None,&nbsp;it&nbsp;means&nbsp;the&nbsp;ExtentInteractiveOverlay&nbsp;will&nbsp;be&nbsp;active&nbsp;regardless&nbsp;of&nbsp;the&nbsp;setting&nbsp;of&nbsp;LeftClickDragMode.

---

<div class="post-metadata">

**Author:** ![Cody](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Cody](https://community.thinkgeo.com/u/Cody)\
**Post date:** [February 29, 2012, 3:04pm UTC](https://community.thinkgeo.com/t/extentinteractiveoverlay-in-wpf/3163/2 "2012-02-29T15:04:05Z")

</div>

Follow-up&nbsp;question…&nbsp;Why&nbsp;can’t&nbsp;I&nbsp;have&nbsp;the&nbsp;LeftClick&nbsp;do&nbsp;ZoomOut?&nbsp;Why&nbsp;make&nbsp;the&nbsp;RightClick&nbsp;only&nbsp;ever&nbsp;do&nbsp;zoom&nbsp;out&nbsp;and&nbsp;the&nbsp;LeftClick&nbsp;only&nbsp;ever&nbsp;zoom&nbsp;in?&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;want&nbsp;to&nbsp;make&nbsp;a&nbsp;tool&nbsp;that&nbsp;does&nbsp;the&nbsp;zoom&nbsp;out&nbsp;using&nbsp;left&nbsp;click&nbsp;and&nbsp;drag,&nbsp;if&nbsp;they&nbsp;choose&nbsp;to.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [March 5, 2012, 1:44pm UTC](https://community.thinkgeo.com/t/extentinteractiveoverlay-in-wpf/3163/3 "2012-03-05T13:44:24Z")

</div>

&nbsp;Cody,

I&nbsp;think&nbsp;it's&nbsp;a&nbsp;legecy&nbsp;problem,&nbsp;when&nbsp;we&nbsp;first&nbsp;define&nbsp;the&nbsp;API&nbsp;we&nbsp;might&nbsp;want&nbsp;it&nbsp;to&nbsp;make&nbsp;consitant&nbsp;with&nbsp;DesktopEdition&nbsp;so&nbsp;that&nbsp;we&nbsp;use&nbsp;the&nbsp;same&nbsp;type,&nbsp;however&nbsp;even&nbsp;we&nbsp;know&nbsp;it's&nbsp;not&nbsp;good&nbsp;choice&nbsp;but&nbsp;we&nbsp;couldn't&nbsp;change&nbsp;it&nbsp;because&nbsp;it&nbsp;will&nbsp;cause&nbsp;our&nbsp;dll&nbsp;breaking-change&nbsp;that&nbsp;not&nbsp;compatiable&nbsp;with&nbsp;old&nbsp;version.

It's&nbsp;possible&nbsp;to&nbsp;have&nbsp;the&nbsp;LeftClick&nbsp;do&nbsp;Zoom&nbsp;out,&nbsp;you&nbsp;can&nbsp;extend&nbsp;our&nbsp;MapSuite&nbsp;that&nbsp;just&nbsp;create&nbsp;a&nbsp;custom&nbsp;overlay&nbsp;and&nbsp;override&nbsp;the&nbsp;MouseDownCore&nbsp;method&nbsp;and&nbsp;assign&nbsp;the&nbsp;it&nbsp;to&nbsp;wpfMap.ExtentOverlay

`    public class CustomExtentInteractiveOverlay : ExtentInteractiveOverlay    {        protected override InteractiveResult MouseDownCore(InteractionArguments interactionArguments)        {            if (interactionArguments.MouseButton == MapMouseButton.Left)            {                interactionArguments.MouseButton = MapMouseButton.Right;            }            else if (interactionArguments.MouseButton == MapMouseButton.Right)            {                interactionArguments.MouseButton = MapMouseButton.Left;            }            return base.MouseDownCore(interactionArguments);        }    }wpfMap1.ExtentOverlay = new CustomExtentInteractiveOverlay();`

Let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;more&nbsp;questions.

Thanks,

James
