Below is how I currently collapse a splitcontainer but I would like an extra effect so that when I collapse the container it should collapse slowly so that it will be feel like animation.
How can I do it this with 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();
}