If I create instances of my UserControls, and then add them to the StackPanel like follows:
var myUC1 = new MyUserControl(GetControlData<Quick_Box>());
var myUC2 = new MyUserControl(GetControlData<Quick_Star>());
myStackPanel.Children.Add(myUC1);
myStackPanel.Children.Add(myUC2);
I can see that they're added, one after the other. However, if I don't create the instances beforehand, and attempt to create the instances as I'm adding them to the StackPanel as follows:
myStackPanel.Children.Add(new MyUserControl(GetControlData<Quick_Box>()));
myStackPanel.Children.Add(new MyUserControl(GetControlData<Quick_Star>()));
the second instance always overwrites the first. Why is this?