Main Menu

Selection on image

Started by Deer2014, January 24, 2024, 09:05:42 PM

Previous topic - Next topic


Hi Richard,

With the mouse drag I create a selection on an image. When I click the mouse inside the image loaded into ImageBox, but outside the selection, I want the selection to disappear. Now I find that it disappears after repeated clicks, sometimes it does not. How can this be fixed? Can you help me with this?




If the click occurred outside the selection, we clear the selection by setting selection to Rectangle.Empty. You can also choose to refresh the ImageBox control to update the display and remove the selection visually.