I have a custom control with an arraylist containing Panels. The array is working great in design mode, but when I run the application then the list is set to null.
Is there any difference between an arraylist and a string or int when it comes to persisting the values?
My panel class
<cs>
[Serializable()]
public class MyTabbedPage : Panel
{
public VizTabbedPage()
{
//
// TODO: Add constructor logic here
//
}
</cs>
And my control:
<cs>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Category("Test"),Editor(typeof(VizTabbedPageEditor),typeof(UITypeEditor))]
public System.Collections.ArrayList TabPages
{
get
{
return tabPages;
}
set
{
tabPages = value;
if(tabPages != null)
{
updateTabPages();
}
}
}
</cs>
Is there any difference between an arraylist and a string or int when it comes to persisting the values?
My panel class
<cs>
[Serializable()]
public class MyTabbedPage : Panel
{
public VizTabbedPage()
{
//
// TODO: Add constructor logic here
//
}
</cs>
And my control:
<cs>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Category("Test"),Editor(typeof(VizTabbedPageEditor),typeof(UITypeEditor))]
public System.Collections.ArrayList TabPages
{
get
{
return tabPages;
}
set
{
tabPages = value;
if(tabPages != null)
{
updateTabPages();
}
}
}
</cs>