Is there any way i can animate Grid column width or Grid row height from XAML?
A:
The ColumnDefinition.Width
and RowDefinition.Height
properties are of type GridLength
, and there is no built-in animations for this type. So if you want to do that, you will probably have to create your own GridLengthAnimation
class. That's probably not too impossible if you take DoubleAnimation
as an example, but not easy either...
EDIT: actually, there are several interesting results if you search "GridLength animation" on Google...
http://windowsclient.net/learn/video.aspx?v=70654
http://marlongrech.wordpress.com/2007/08/20/gridlength-animation/
http://www.codeproject.com/KB/WPF/GridLengthAnimation.aspx
Thomas Levesque
2010-07-05 18:34:17