开发者

UIElement.IsMouseOver returns false

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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜