Question

I have a lot of UserControls placed on my Page. All of them are in grid rows and colums. Also there are several nested grids that contain UserControls. But now I need to provide Snapped VisualState with these UserControls but with completely different layout.

It is easy to select inner styles for UserControls but it is not clear for me how can I change for instance Grid.RowDefinitions with 2 rows to Grid.RowDefinitions with 3 rows, change every Grid.Row property for inner UserControls and even more to replace some childs elements from one grid to another.

Is it possible to make some Template for Grid elements?

Was it helpful?

Solution

After some struggles trying to dynamically layout and restyle controls depending on view state I decided to use the template approach and simply have separate views for different... views. Basically have separate logical tree for each view and switch visibilities of these depending on view state.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top