[英]C# - bunifu animation doesn't work
在调试项目时,面板的动画不会显示。它只会滞后,而不会显示过渡。
if (sidePanel.Width == 260)
{
PanelAnimator.ShowSync(sidePanel);
sidePanel.Width = 0;
panelProduct.Height = 0;
panelOrdering.Height = 0;
panel4.AutoScroll = false;
}
else
{
PanelAnimator.ShowSync(sidePanel);
sidePanel.Width = 260;
panel4.AutoScroll = true;
}
这个PanelAnimator.ShowSync(sidePanel);
应该是PanelAnimator.HideSync(sidePanel);
因为已经显示了侧面板 。
PS:在ShowSync(panel)VV之前,sidepanel Visible属性应该为false
就像是
if (sidePanel.Width == 260)
{
sidePanel.Width = 0;
panelProduct.Height = 0;
panelOrdering.Height = 0;
panel4.AutoScroll = false;
PanelAnimator.HideSync(sidePanel);
}
else
{
sidePanel.Width = 260;
panel4.AutoScroll = true;
PanelAnimator.ShowSync(sidePanel);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.