0

I'm creating a control which is derived from Panel. When mouse is clicked on one of the children it gets the OnMouseLeftButtonDown overriden method called. When mouse is clicked on the control itself, there is no event. How come?

4

1 回答 1

2

If you have no Background set on the Panel, it is not only transparent, but also mouse-transparent.

This is usually set via a TemplateBinding in the default style for your custom control.

于 2009-09-03T10:22:03.007 回答