views:

342

answers:

1

Hi,

I have a silverlight control that has a few element such as: Image, TextBox and a TextBlock.

The application shows a list of the same control and the controls are placed in a specific layout, in grid with rows and cols.

Now,

I would like to be able to modify all the controls layout and arrange the element differently (preferred animatedly) without reloading the control.

Does anyone know how to do so?

Thanks, Ronny

+1  A: 
  1. Use the States pane in Expression Blend 3 to define different layouts.
  2. Use the GoToStateAction for the objects/events that you want to trigger the change or call VisualStateManager:GoToState(this, "NewState", true) from your code behind to switch layouts.
  3. Use FluidLayout (the wave-shaped first button first for the State Group) to animate the change from one grid col/row to another.
Michael S. Scherotter
Great way to modify the layout :)But I have the elements organized in a grid. How can I modify the elements location (changing the row and the col) and still animate them to their new location?I'm using the grid auto width and height because the size of the element in unknown and I would like to change their location and still keep the "stretch" functionality.
Ronny
I added a third item for what you want.
Michael S. Scherotter
Thanks, but when I turned the fluidlayout on, I got ag_e_parser_bad_type exception
Ronny
This is for Silverlight 3 - do you have SL 3 installed?
Michael S. Scherotter