tags:

views:

62

answers:

1

Hi,

I am getting familiar with Expression Blend 3 and it is great fun but one thing I cannot work out is how do I animate the height and width of a control?

I have used the the scale transform but this just increases the scale but what if I just want to stretch the control?

Thanks

+1  A: 

A stretch is a ScaleTransform that only affects one of the dimensions (either X or Y) of the element. Is your problem that you are scaling both X and Y, when you only want to scale one of them?

KeithMahoney
A better way of explaining is it is that the scaletransform gets closer to you but I don't want the object to get closer, I just want to increase the x and y (width and height) parameters so the object gets bigger but not closer.
dotnetdev
OK, I think I understand what you mean. If you have a 100x100 Button with the text "Click Me" in it, and you apply a ScaleTransform to that button, scaling it by 2X, you will end up with a button 200x200 with the "Click Me" text doubled in size. What you want is the Button to get bigger so that it is 200x200, but you don't want to "zoom in" on the button, so the "Click Me" text ends up staying the same size? Is that correct? In that case you want to animate the Width and Height properties on the Button, and not a ScaleTransform.
KeithMahoney
I agree, animate the Width and Height so the control grows in size but the contents remain the same.
Paully
PS - they are in the Layout section, rather than the Transform section of the properties if you can't find it, usually above the Margins.
Paully
Yeah I know where those two properties are, thanks :) I will try to animate those, bit of learning coming up...
dotnetdev