Generate a new control for each listed item

0

Hello, based on the code below, I would like to know how to generate a new control (in my case a grid) for each existing item in my ListBox ...

My ListBox:

<ListBox Height="380.585" Width="258.998">
   <ListBoxItem x:Name="i" Content="grade"/>
   <ListBoxItem x:Name="ii" Content="grade"/>
   <ListBoxItem x:Name="iii" Content="grade"/>
   <ListBoxItem x:Name="iv" Content="grade"/>
   <ListBoxItem x:Name="v" Content="grade"/>
</ListBox>

Explanation:  The reason for the function is that I want to use a WrapPannel to display graphic templates for each item, and so ... there is always the number of Grids corresponding to items in list.

    
asked by anonymous 25.11.2017 / 18:33

0 answers