Problem with my component

M

Mauro

Hi,
I have created a component similar to ImageList but my component stored Icons
(System.Drawing.Icon). For being precise, the stored data is an object created
from me that to its inside it has an istance of the Icon object.
The problem is that the icons store in the collection associated to my IconList
(IconList.Icons) at Design-Time, were removed a Run-time. Me meeting therefore
with one empty collection. How I can resolve the problem?

Sorry form my English :)

Mauro.
 
G

Guest

Hi Mauro,

I don't know how to do it directly, but i show you a way.

An "ImageList" uses "ImageStream" property to serialize its
content to the resources. I think that you can do it similar to
ImageList. You will need the property that will serialize whole icon
collection to the resources.

You should add [Browsable(false)] to hide this property in property
explorer.

HTH

Marcin
 
M

Mauro

Marcin Grzebski ha detto questo mercoledì :
Hi Mauro,

I don't know how to do it directly, but i show you a way.

An "ImageList" uses "ImageStream" property to serialize its
content to the resources. I think that you can do it similar to ImageList.
You will need the property that will serialize whole icon collection to the
resources.

You should add [Browsable(false)] to hide this property in property
explorer.

HTH

Marcin

Hi Marcin,
thanks for your answer. I will try to make as you have suggested to
me. :)

Mauro.
 
M

Mauro

Mauro ci ha detto :
Marcin Grzebski ha detto questo mercoledì :
Hi Mauro,

I don't know how to do it directly, but i show you a way.

An "ImageList" uses "ImageStream" property to serialize its
content to the resources. I think that you can do it similar to ImageList.
You will need the property that will serialize whole icon collection to the
resources.

You should add [Browsable(false)] to hide this property in property
explorer.

HTH

Marcin

Excuse me but I do not succeed to understand how creating the
IconListStreamer object.
1) I have created a IconListStreamer class that implements
ISerializable
2) I have created a IconStream property of IconListStreamer type in my
IconList class
3) I don't understand how serializzare the Icons' collection. :-(

Mauro
 

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