I have 2 columns in a Grid. When I click a button, I want the first column to animate to the left from it\'s current position to 0. So, in effect, it collapses and I\'m le
I have taken Todd Miranda's C# source code and modified it, to demonstrate how to animate DataGrid Column widths shrinking & expanding.
Here's the source code...
http://www.pocketpctoolkit.com/WPF/DataGridColumnWidthAnimation.zip
Basically, you click on a CheckBox, and whichever DataGrid columns have their "MinWidth" value set to 0 will be shrunk to zero-width. Click the CheckBox again, the columns will animate back to their original widths.
This WPF code also demonstrates how to create animations / storyboards in code behind.