Problem with Wpf Background

When I do not set the background of my panel, I cannot receive mouse events. why is this behavior? I can get mouse events on the panel by setting Background to Transparent, which is null by default. What is the difference between Background null and Transparent?

+3
source share
1 answer

When Background=nullit does not issue the MILCore drawing command when rendering and does not take into account the entire control area in hit tests.

When Background=Transparent, it issues the usual MILCore drawing command when rendering and controls the entire area when testing strokes.

Brushes.Transparent - , () . - . , , Brushes.Transparent.

, , Brushes.Transparent , . , : OS , , Brushes.Transparent, , . Brushes.Transparent.

+7

Source: https://habr.com/ru/post/1722656/


All Articles