Click here to Skip to main content
15,796,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm trying to animate the height property of a control, to resize it at the press of a button (working on the property with a DoubleAnimation). If I initialize the height property to a defined value (in the XAML), the animation works well. But I if initialize the height property to Auto (in the XAML; I'd have it so to have the size of the control vary dynamically based on its content), the animation doesn't work (it starts, but it produces no effect).
Anyone knows if there's a method to animate a property initialized to "Auto"?
Updated 24-Mar-11 5:43am
Tarun.K.S 24-Mar-11 10:43am    
ActualHeight of your control might help you.
JonSn0w 24-Mar-11 10:48am    
When set to Auto, the retrieved ActualHeight is 0; I cannot animate the ActualHeight because it is a get only property

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900