When updating the height, if the height was set to Double.NaN the animation wouldn't work because it doesn't know how to animate to Double.NaN The problem with the ScaleTransform is that it reserves the controls space so its parent control wont actually update. I changed the animation to work on the Height instead of a ScaleTransform. It took a little bit but I had to go back to how I was working with it before. I know that it will not be the same as yours but I am sure that there is something here that you are missing that you may see in my template. Here is something of what I have that perhaps you could use as a Template. I don't see anything in regards to your stackpanel in the XAML that you have posted. Its worth noting this is just the details of the problem, the stack panel actually contains other content so I can't just run the animation on the root. the animations work fine, its the outer stackpanel thats not resizing. When I run the animation it runs fine other than when I scale the content down I would like its parent container to scale down as well.Ĭurrently the control I am scaling down is inside of a stackpanel, I have also tried putting it in a Grid and Setting its RowDefinition to Auto, but when the content gets scaled down I am left with the outer control staying the same size in both cases. Currently I have a ControlTemplate I am trying to add a sliding animation to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |