Category / Section
How to hide the Popup window when you move the mouse pointer out of the Popup window?
1 min read
You can hide the PopupContainerControl when you move the mouse pointer out of the window by handling the MouseLeave event. The following code examples explain how to hide the PopupContainerControl.
C#
this.dateTimeControl1.MouseLeave += new EventHandler(dateTimeControl1_MouseLeave);
void dateTimeControl1_MouseLeave(object sender, EventArgs e)
{
if (!this.dateTimeControl1.Bounds.Contains(popupControlContainer1.PointToClient(Cursor.Position)))
this.popupControlContainer1.HidePopup(PopupCloseType.Deactivated);
}
VB
AddHandler dateTimeControl1.MouseLeave, AddressOf dateTimeControl1_MouseLeave
Private Sub dateTimeControl1_MouseLeave(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.dateTimeControl1.Bounds.Contains(popupControlContainer1.PointToClient(Cursor.Position)) Then
Me.popupControlContainer1.HidePopup(PopupCloseType.Deactivated)
End If
End Sub
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/PopupWindow-1094055279.zip
Didn't find an answer?
Contact Support