The IsMouseOver property for a user interface element indicates whether the mouse is currently over the element. When an element is contained within another element in the logical tree, then IsMouseOver will be true for both the lower-level element and for any elements higher up in the logical tree. Suppose that we have a Button in a StackPanel which is inside a Window .