ColumnHeaderCollection: Add Items at DesignTime

  • Thread starter Thread starter Stefan Urech
  • Start date Start date
S

Stefan Urech

Hi,
i'm building a own ListView-Control. For that, i wrote a new
ColumnHeader-Collection, which implements IList.
So far, so good. In the Designer of VS.Net, i see the collection as a
Property and i can edit it with the default collection Editor.
The Problem is: He doesn't write the new entries for the collection in
the source code! He creates a new ColumnHeader object, but doesn't add
them to the collection!

In the framework-ListView, this feature works fine...

i'm pleased for every answer

thx surech
 
I found the solution!
Simply put the Attribut DesignerSerializationVisibility
over the Property with the collection, and done!

[DesignerSerializationVisibility( DesignerSerializationVisibility.Content )]
public ColumnHeaderCollection Columns
{
get { return columns; }
set { columns = value; }
}

cu surech
 
Back
Top