This topic has not yet been rated - Rate this topic

Control.OnMouseEnter Method

May 02, 2013

Called before the MouseEnter event occurs.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
protected virtual void OnMouseEnter(
	MouseEventArgs e
)

Parameters

e
Type: System.Windows.Input.MouseEventArgs
The data for the event.

The OnMouseEnter method is called before any event handler for the MouseEnter event is called. This method allows derived classes to handle the MouseEnter event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Because Windows Phone only provides a touchscreen surface for pointer interactions, the MouseEnter event will not fire unless your control is tapped onscreen. Therefore OnMouseEnter(MouseEventArgs) and OnMouseLeftButtonDown are functionally redundant.

Windows Phone OS

Supported in: 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.