Thank you for the provided code snippet.
The described behavior is expected for the WPF Framework. In this case, the initial value of the Brush
property is null. When the Background
, the framework won't considered it for hit testing, and thus it won't be eligible for mouse events. You can observe the same behavior if you bind the Background
property of a StackPanel
framework element. If you don't want to set an initial color you can set the Background to Transparent
. Setting it to Transparent the mouse events will be called.
I have prepared a sample project to demonstrate this behavior. When you run the project, you can observe 3 StackPanels. The first one has a Null
background, the second has a Transparent
background and the third one has a Blue
background. You can observe that the mouse down event is not called for the first StackPanel.
Get quickly onboarded and successful
with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.