Search code examples
xamlgrid-layoutvisualstatemanager

xaml VisualState set Grid.Row/Column of element


I have a Grid Layout with 7 elements in row. I want to move last 4 elements from first row to second if windowScreenWidth less than X. I already added a group and states. If i use <Setter Target="el4.Grid.Row" Value="1"/> or <Setter Target="el4" Property="Grid.Row" Value="1"/> xaml throw exception.

Are there any way to make what i want?


Solution

  • The right XAML code is: Target="el4.(Grid.Row)" Value="1"/>

    A bit late, but might help other people. Because the solution given wasn't the best (using if instead of style and states).