Groups | Blog | Home
all groups > dotnet windows forms designtime > october 2005 >

dotnet windows forms designtime : How to provide design-time support for LinearGradientBrush type?


Marcin Rzeznicki
10/8/2005 6:18:42 AM
Hello,
I am writing control which exposes design-time browsable property for
setting gradient background of type LinearGradientBrush. I wanted to
provide design-time support for creating brushes. Having delved into
that topic it seemed to me that creating my own UITypeEditor showing
modal form was the best way to achieve my goal. So I did. Everything
worked fine till I realized that brush produced by my editor was not
serialized into code. After quite long and unfruitfull search I do not
see any way to do the serialization. I would like to implement code
serializer (due to complicated setup of LinearGradientBrush it seems to
me that it is impossible to achieve serialization by InstaceDescriptor
way), yet I cannot attach it to LinearGradientBrush type as the
attribute is of class level. Is there any way out of this maze? I 'd
really appreciate any help, thank you in advance
Frank Hileman
10/8/2005 10:06:06 AM
That class is not designed to be serialized. You will need to create your
own class, as we did with VG.net.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

[quoted text, click to view]

Marcin Rzeznicki
10/8/2005 3:15:12 PM
Frank Hileman napisal(a):
[quoted text, click to view]

Thank you.
Is the case of XmlNode the same? I'd like to be able to edit some xml
files in desig-time, yet inspection of docs shows that XmlNode does not
implement ISerializable.
AddThis Social Bookmark Button