How to expose the Image-Size-Property of an ImageList in a User Control?

  • Thread starter Thread starter Jan Liße
  • Start date Start date
J

Jan Liße

Hallo,
I've got a user control containing an ImageList and I want to enable
the user of my control to change the size of the Images stored
in the ImageList during design-time. Any suggestions how I can manage this?
Thanks in advance,
Jan
 
* "Jan Liße said:
I've got a user control containing an ImageList and I want to enable
the user of my control to change the size of the Images stored
in the ImageList during design-time. Any suggestions how I can manage this?

Add two properties for the size (or a property of type 'Size') which set
the size of the images in the list.
 
I still have a question.
In the class of my control i declared in the header of my class: "private
Size UserdefinedSize"
and I added the property:
----------------------------------------------------------------------------
------------------
public Size UserdefinedSize
{
get
{
return UserDefinedSize;
}
set
{
UserDefinedSize = value;
}
}
----------------------------------------------------------------------------
--------------------

I think it is ok so far. But i am not sure how to set this property now for
my ImageList.ImageSize...
I tried: "myImageList1.ImageSize = UserdefinedSize" in the constructor of my
class but that leads to build-errors (class already contains a definition of
"UserDefinedSize")!
 
Back
Top