Allow mouse dragging to pass through a control?

0
0

Is it possible to put one object on top of another and completely ignore mouse events to the top control. I want the lower object to have Movable set to true, so the user can drag the item around. So far nothing I’ve done seems to allow that:

Overlay.Focusable = false;
Overlay.Enabled = false;
Overlay.TabStop = false;
Overlay.Update();

Overlay still intercepts the mouse before I can click and drag the underlying object.

Is this possible to do?

Thanks!

-John

  • You must to post comments
0
0

I gave you the wrong info. Control.Anonymous makes the control ignore the pointer events and let them bubble up to the parent. There is only one way to make an element transparent to the pointer, set the CSS: pointer-event: none. I works only on Chrome and maybe FireFox.

If you place an element in front of another it will catch the events, unless you set pointer-events: none.

  • John Nagle
    Good to know, I will set it and test it on my browsers and see what happens. Thanks!
  • You must to post comments
0
0

So I took your example, and incorporated it into my app, with some modifications.

I have an outer panel, and an interior panel with a dashed line (similar to the one you saw in my first version). When I add an image, I “BringToFront” the dashed line so that it overlays the image. Even though I set it to “Anonymous”, I can’t drag the picture. (I can if I click outside the rectangular boundary of the inner circle.)

If there’s a better way to overlay a dashed circle, I’m up for that also.  🙂

Thanks!

-John

  • You must to post comments
0
0

Perfect, thanks so much Luca!

-John

  • You must to post comments
0
0

Attached here the sample I sent you privately. Shows a simple technique to drag controls, change the style and crop in a circular container.

  • You must to post comments
0
0

Try Anonymous = true.

Anonymous controls are transparent to pointer events.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.