Groups | Blog | Home
all groups > dotnet windows forms designtime > december 2004 >

dotnet windows forms designtime : Point & PointF


adrin
12/29/2004 12:22:15 AM
How come I can change the values of X & Y for a Point in a Property Grid but
not for a PointF?
I suppose a UITypeEditor must be written but all the examples that I've seen
don't show how to display the
X and Y as to separate values... Is this possible?

Thanks,
Adrin

Andrey Shchekin
12/30/2004 1:03:47 PM
Hello Adrin,

You have to write your own TypeConverter class that is derived from the ExpandableObjectConverter.
Then you will have to apply the TypeConverter attribute to your PointF property,
specifying your own converter.

You also can use your type converter to show custom editable string value
for your property, like the PointConverter does. You will have to override
the methods CanConvertFrom, CanConvertTo, ConvertFrom and ConvertTo.

--
Andrey Shchekin

[quoted text, click to view]

AddThis Social Bookmark Button