I have a border that is acting as a button, although within it there is a grid with textblocks in the cells of the grid. I am using the previewmousedown event to test to check the data of this border and respond accordingly. I can't seem to get it to behave consistently though, and I don't know where the error is. Sometimes the event fires and it behaves as it would expect. Sometimes I have to click within the border several times before it registers that the previewmousedown event has occured. I can't see that there are any other events firing that are handling it up the tree, so I can't work out where the trouble could be.
Any help would be really appreciated!