ColumnHeaderCollection: Add Items at DesignTime

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
 
S

Stefan Urech

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top