I have a list of dynamic data that needs to display in the following manner:
1 4 7 10
2 5 8 11
3 6 9 12
13 16 19 22
14 17 20 23
15 18 21 24
...
However my code only iterates the top portion and runs off the screen. The following code is inside a grid. What am I doing wrong?
<toolkit:WrapPanel Orientation="Vertical" Grid.Row="2" >
<ItemsControl ItemsSource="{Binding ImagingTypes, Mode=TwoWay}"
Margin="5">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="5,0,5,0">
<CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}" VerticalAlignment="Top" />
<TextBlock Grid.Column="1" Text="{Binding Description}" MaxWidth="150" TextWrapping="Wrap" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</toolkit:WrapPanel>
Sorry.I don't know very well English so I couldn't understand exactly what you mean.But If you want a sequence as above and If you want to remain static position of items.You can use UniformGrid . I hope this is what you're looking for.
Here is code:
I did a listview sample;