This is weird !! Try to customize the control template of a button,
- Place a grid as the base panel (don’t add any Background property to it)
- Add an ellipse and a content presenter to this
- Add a Click event handler to the button
- Run it and try to click on the white space, the event will not be raised !!!
Go back to the template,
- Add a Background property to the grid and set the value to Blue (can be any color other than transparent)
- Run it and try to click on the Blue color, the event will be raised !!!
Go back to the template,
- Set the value of the Background Property to Transparent
- Run it and try to click on the white space, the event will still be raised !!! (WHY ?!?)
Looks weird to me thou’
Tags: Controls, ControlTemplate, DoUNo, WPF, xaml
