XAML Disabling Events on Child Elements when moving Parent

526 views Asked by At

I have an ItemsControl that Contains a few buttons, My Items control is movable, you can move it around by dragging it. the issue is when I click and drag my control to move it, and leave the mouse on top of a button inside the control, it fires the click event of the button which I dont' want/

So While I am moving the control around I want to disable any events on the child buttons, I used IsDisabled = true but that changes the appearance of the buttons too which I dont want.

1

There are 1 answers

0
Nishi On

you can set IsHitTestVisible property of button to false

IsHitTestVisible="False"