There is a collection of objects that represent the data. There is a class that is a collection of xaml markup elements. Depending on the number of objects in the data collection, an appropriately sized array of markup objects is created. It is necessary to make a bidirectional connection between them. For example. Data:
public class SampleData { public string Name { get; set; } public int Count { get; set; } } Markup:
class CountBlock : StackPanel { TextBlock tbName; TextBlock tbCount; Button btn; }
MVVM? - MihailPwCountBlockyou give all the code for theCountBlockclass? This will not work. And why do you want to link the elements in the code-behind? I hope not because you do not know how differently? - VladDCountBlock, without it is not clear. - VladD