[Mono-winforms-list] Private ImageList methods removed in r69012

Chris Toshok toshok at ximian.com
Wed Dec 6 09:47:17 EST 2006

so I just brought up visual c# express (which is admittedly 2.0) and
none of the image list properties affected (ColorDepth, ImageSize,
TransparentColor) acted as if they had a Reset or ShouldSerialize

from that article, an easy way to determine this is:

1. select the ImageList in the design surface.

2. Look at its properties.  If a property is in bold, it doesn't have a
ShouldSerialize method (and also doesn't have a DefaultValue attribute,
but that's irrelevant here).

3. change the value of the property, then right click on it.  If the
"Reset" item in the menu is disabled ,the property lacks a Reset method
(and also lacks a DefaultValue attribute, but again that's irrelevant).

in all three cases, the property was bold at the start, and the reset
menu item was never enabled.  Would someone mind doing the above 3 steps
on those three properties inside vs2003?

are these methods used in another context outside of designers?  If not,
I'd say removing them was the right change.  If they're needed in 1.1
I'll add them back in ifdefed for 1.1 and make them internal instead of
private to keep the warnings down.


On Wed, 2006-12-06 at 09:24 -0500, Chris Toshok wrote:
> do we know that the designer in visual studio behaves as if it can call
> these methods?  The designers of course have to use reflection to find
> the methods, but in the other cases these methods aren't private.  If
> visual studio behaves as if the methods are there, we have another piece
> (besides the msdn docs and corcompare output) we need to look at to see
> which methods needs implementing.
> Chris
> On Wed, 2006-12-06 at 14:37 +0100, Kornél Pál wrote:
> > Hi,
> > 
> > The removed methods were private but they were intended to be used by 
> > designers.
> > 
> > This feauture is documented:
> > http://msdn2.microsoft.com/en-us/library/53b8022e.aspx
> > 
> > Also note that I noticed the behavior in Visual Studio designer that can 
> > only be implemented using these methods.
> > 
> > And I belive that it is legal to call these methods using reflection and 
> > study their behavior altough it wasn't necessary.
> > 
> > Applications should not rely on the presence or absence of these methods if 
> > they are private but a properly implemented designer (or maybe other 
> > applications) can call these methods and the absence of these methods will 
> > result in different designer behavior regarding the default property values.
> > 
> > Kornél 
> > 
> > _______________________________________________
> > Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list

More information about the Mono-winforms-list mailing list