[Mono-bugs] [Bug 362601] New: PropertyGrid: TypeConverterAttribute on a property is ignored
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Feb 17 15:57:49 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=362601
Summary: PropertyGrid: TypeConverterAttribute on a property is
ignored
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: contact at i-nz.net
ReportedBy: andyhume32 at yahoo.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
The current code respects the TypeConverterAttribute when applied to a type.
When applied to a particular property however the attribute is ignored.
Repro is attached, another version of my WinForms PropertyGrid 'many types'
app. It has three properties of type System.Version, in category "my
Attributes on Properties":
* one property is attribute-less, so is not editable and is just displayed by
ToString fall-back as "X.X.X.X".
* one which has a TypeConverter applied to the property, the t/c can convert
from Version to string as "vX.X.X.X", and thus should be displayed in that
format.
* and finally, one which has a TypeConverter applied to the property which can
convert to and from, and thus should be displayed and editable. Displayed as
the previous, but editable as "vX.X.X.X" or "X.X.X.X".
That behaves as expected in MSFT. In Mono all three display as "X.X.X.X" and
are not editable. Therefore it appears that the attributes are ignored.
I would have guessed that the properties and the converter value were returned
by TypeDescription.GetProperties / PropertyDescriptor.Converter, but those
methods seem to be working properly. I'll log a new bug with some unit-test to
confirm that.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list