New to Telerik UI for WinForms? Download free 30-day trial

CLR Events

RadControl inherits from the standard Windows Forms ScrollableControl, and so has access to the principal mouse, keyboard, font, sizing, layout and painting events. These events are captured and passed to the element tree where appropriate. For example, the OnMouseEnter event inherited from ScrollableControl first notifies the RootElement that a the mouse is over the control, then invokes the standard OnMouseEnter behavior from ScrollableControl.

OnMouseEnter

protected override void OnMouseEnter(EventArgs e)
{
    if (!DisableMouseEvents)
    {
        this.RootElement.IsMouseOver = true;
        this.RootElement.IsMouseOverElement = true;
    }
    base.OnMouseEnter(e);
}

Protected Overrides Sub OnMouseEnter(ByVal e As EventArgs)
    If Not DisableMouseEvents Then
        Me.RootElement.IsMouseOver = True
        Me.RootElement.IsMouseOverElement = True
    End If
    MyBase.OnMouseEnter(e)       
End Sub

See Also

In this article