Hello,
I am developing an application with WPF that uses a 3rd party software. I`m struggling to make some label generated dynamically from an wpf user control and it seems that i`m not able to succeed.
Well, lets start.
I have an windows form that host an wpf user control. In that control i want to generate those labels and populate another windows form that pops up after the labels insertion.
The code looks something like this:
public void GetPropertyInfo(IvcComponent comp)
{
int nr = comp.getPropertyCount;
PropertyControl pc = new PropertyControl();
for(int i=0;i<nr;i++)
{
Label x = new Label();
x.Name = comp.getPropertyName(i);
x.Content = comp.getPropertyName(i);
}
pc.ShowDialog();
}