尝试包含基于以下代码的 hoverIntent:
private void ViewerTab_MouseLeave(object sender, MouseEventArgs e)
{
_mouseOverTabPanel = false;
ChangeCurrentPanelPosition(TabPanelPosition.Bottom);
}
private void ViewerTab_MouseEnter(object sender, MouseEventArgs e)
{
_mouseOverTabPanel = true;
}
理想情况下,ChangeCurrentPanelPosition 应该只在 mouseleave 约 1 秒后触发,如果 mouseEnter 再次出现,计时器将清除。