Hi,
Just create the controls (labels) dynamically. Here is a small code snippet that demonstrates the concept:
var window = new Window();
var stackPanel = new StackPanel { Orientation = Orientation.Vertical };
stackPanel.Children.Add(new Label { Content = "Label" });
stackPanel.Children.Add(new Button { Content = "Button" });
window.Content = stackPanel;
Otherwise, refer to the following:
wpf - create controls dynamically[
^]
Kind regards,