/// <summary> /// On mouse move, we notify the subscribers of <see cref="DropDownMouseMove"/>. /// </summary> /// <param name="e"></param> protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); int index = IndexFromPoint(e.Location); if (index < 0) { return; } DropDownMouseMove?.ThreadSafeInvoke(this, new DropDownMouseMoveEventArgs(Items[index], e.Location)); }
/// <summary> /// When the mouse moves over a drop down item, we fire the event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DropDownMouseMoveEventArgs"/> instance containing the event data.</param> private void listBox_DropDownMouseMove(object sender, DropDownMouseMoveEventArgs e) { DropDownMouseMove?.ThreadSafeInvoke(sender, e); }