Re: How can I set an image as DefaultValue Attribute to a UserControl Property?
Originally Posted by jmcilhinney
Hmmm... I came back to correct some of what I posted and it seems that it has already been corrected. It occurred to me some time after my previous post that the TypeConverter attribute may well be able to be applied at more than just the class level and found that that is the case upon checking. As suggested, that would mean that you could apply your own custom TypeConverter to that property. My thought was to use a base-64 String but I guess any String representation could be used, as Sitten Spynne suggested. Apologies for the partially incorrect information but, in my defence, most of what I posted earlier was news to me and I only got that specific information from the documentation after reading your question. If you want to learn with so many exclamation marks, you probably ought to be doing that reading yourself.
To be fair, the thought of pasting the Base64 representation of the average image into the code is hideous enough to give me pause. I think I'd try the Embedded Resource approach, myself, but I've had bad experiences with that too.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.