Quantcast
Viewing all articles
Browse latest Browse all 4

Looping through List

Hi,

I used this code

<

ScrollViewer x:Name="sv" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" Height="Auto" Width="Auto" Grid.ColumnSpan="3" Grid.RowSpan="3">

<ItemsControl x:Name="ChapterList">

<ItemsControl.ItemsPanel>

<ItemsPanelTemplate>

<StackPanel />

</ItemsPanelTemplate>

</ItemsControl.ItemsPanel>

<ItemsControl.ItemTemplate>

<DataTemplate>

<Button Margin="5,5,5,5" Content="{Binding CuisineName}"Width="120" Height="80"/>

</DataTemplate>

</ItemsControl.ItemTemplate>

</ItemsControl>

</ScrollViewer>

 

 

Its working great.

But i want to dispaly "CuisineName" 3 names per row and columns will be N numbers.

three buttons (names) in per row and col depends on database values, lets say N numbers,

Can any one tell me how i can display 3 buttons per row?

 

thanks in advance,

 

Geeta

 

 

 


Viewing all articles
Browse latest Browse all 4

Trending Articles