Is there any way I can animate Grid column width or Grid row height from XAML?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
ColumnDefinition.WidthandRowDefinition.Heightproperties are of typeGridLength, and there is no built-in animations for this type. So if you want to do that, you will probably have to create your ownGridLengthAnimationclass. That’s probably not too impossible if you takeDoubleAnimationas 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