在调试项目时,面板的动画不会显示.它只是滞后,但并没有表现出转变。
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;
}发布于 2017-10-24 14:15:31
这个PanelAnimator.ShowSync(sidePanel);应该是PanelAnimator.HideSync(sidePanel);,因为sidepanel已经显示了。
PS:在ShowSync(面板) V.V之前,sidepanel可见属性应该是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);
}https://stackoverflow.com/questions/46876453
复制相似问题