UIElement.IsMouseOver
will return false
if an other element will over (ZOrder >) that UIElemnt.
Is there a property IsMouseOver = true
for that case?
If you want to determine mouse over states for layered elements you can do manual hit testing.
See Can I make WPF set IsMouseOver for both the covering and covered element?
UIElement.IsMouseOver is true if mouse pointer is over the element or its child elements; otherwise, false. The default is false.
UIElement.IsMouseDirectlyOver true if the mouse pointer is over the same element result as a hit test; otherwise, false. The default is false.
If something was in front of the control (and not a child element) then this would "block" the IsMouseOver property. There is no property in UIElement which ignores the "hit test".
精彩评论