下面是我目前如何折叠splitcontainer但我想要一个额外的效果,这样当我折叠容器时它应该慢慢折叠,以便感觉像动画。
如何使用WinForms进行此操作?
private void button1_Click(object sender, EventArgs e)
{
Thread backgroundThread = new Thread(
new ThreadStart(() =>
{
if (splitContainer1.InvokeRequired)
{
splitContainer1.Invoke(new MethodInvoker(delegate
{
splitContainer1.Panel1Collapsed = !splitContainer1.Panel1Collapsed;
}));
}
}
));
backgroundThread.Start();
}