Created UserControl using the MahApps.Metro library.

<WrapPanel x:Name="shopItems" Height="auto"> <mah:Tile Style="{StaticResource SmallTileStyle}" /> </WrapPanel> 

In the control styles there are objects in which I place a separate text from the array

 <TextBlock x:Name="itemName" Margin="10,131,0,33" FontSize="16" Foreground="WhiteSmoke" Text="{Binding Title}" TextWrapping="Wrap" /> 

But when you start the control, only one element is displayed, not the mass from the list.

 shopItems.DataContext = list; 

How do I display a list of this item?

 <mah:Tile Style="{StaticResource SmallTileStyle}" /> 
  • s8.hostingkartinok.com/uploads/images/2016/11/ ... one block is displayed, and the array can contain many items that need to be screwed. So I load the list of objects `tileItems.DataContext = list;` tileItems - the name of the object <mah: Tile ... - Elizabeth

1 answer 1

Decided in this way

 public ObservableCollection<ShopItem> Elements { get; set; } 

And through the cycle I drove the entire list of objects