all groups > dotnet windows forms designtime > april 2007 >
You're in the

dotnet windows forms designtime

group:

Custom serialization question(s)



Custom serialization question(s) Joe Burke
4/30/2007 7:48:01 AM
dotnet windows forms designtime:
I'm writing a custom XML serializer that can generate XML for any WinForm
object at design or run-time. But there are a couple of cases that I can't
handle properly, but the default Code DOM serializer does. I'd appreciate
any info on how to solve these cases:

1. How can I determine that an object needs to be created as a Resource?
For example, I can write property/value pairs or generate a byte array for an
image but the right answer is to use the bytes. Do I need to special case
just images? Is it because it supports ISerializable? Is it because it uses
an ImageConverter and can be converted to a byte[]? What's the best way to
differentiate this case?

2. I've found some Components just exist at design-time and I don't want
these serialized. For example, on a MenuStrip, at design time, there are
some extra items in the 'Items' collection. Namely something called
a'miniToolStrip' that shouldn't be saved. I haven't found the right logic to
filter out these design-time only components....any ideas?

Thanks,
Joe



Re: Custom serialization question(s) jokiz
5/11/2007 7:33:33 PM
properties with DesignOnly attribute are serialized at the resource
file.

On Apr 30, 10:48 pm, Joe Burke <JoeBu...@discussions.microsoft.com>
[quoted text, click to view]

AddThis Social Bookmark Button