UserControl and List
-
I have a Usercontrol with a public property
List<int> Links
List<int> Links= new List<int>();
public List<int> LinkLabels
{
get { return Links; }
set { Links = value; }
}Now when i put it on a dialog and open the properties dialog in design mode i can click the (...) button and it opens up the add items to collection dialog and i can add a few int(s) to the collection but when i click ok and open it up again all entered values are gone :doh: if i set a breakpoint at the
set
function then thevalue
isempty
any help will be greatly appreciated -Thanks -
I have a Usercontrol with a public property
List<int> Links
List<int> Links= new List<int>();
public List<int> LinkLabels
{
get { return Links; }
set { Links = value; }
}Now when i put it on a dialog and open the properties dialog in design mode i can click the (...) button and it opens up the add items to collection dialog and i can add a few int(s) to the collection but when i click ok and open it up again all entered values are gone :doh: if i set a breakpoint at the
set
function then thevalue
isempty
any help will be greatly appreciated -Thankscan you explain it more with code? When You are adding items? in runtime or during the design?
My small attempt...
-
can you explain it more with code? When You are adding items? in runtime or during the design?
My small attempt...
-
I have a Usercontrol with a public property
List<int> Links
List<int> Links= new List<int>();
public List<int> LinkLabels
{
get { return Links; }
set { Links = value; }
}Now when i put it on a dialog and open the properties dialog in design mode i can click the (...) button and it opens up the add items to collection dialog and i can add a few int(s) to the collection but when i click ok and open it up again all entered values are gone :doh: if i set a breakpoint at the
set
function then thevalue
isempty
any help will be greatly appreciated -Thanks