Search code examples
c#.netwpfgridwpf-controls

Letting click/drag events through a UniformGrid


I have a UniformGrid with a bunch of buttons and lots of space between them. I want the clicks between the buttons to not get handled by the grid, but whatever is behind it, while keeping the functionality of the buttons as is.

I've tried setting

IsHitTestVisible="False"

on the grid, but this results in all buttons to not be intractable as well.


Solution

  • Looks like you need to set the Background to be null, which is however the default value when you do not set the Background property at all.

    Background="{x:Null}"