views:

117

answers:

0

Hi. I'm developing custom control for Compact framework. I want to add some design-time features for it. My control has byte[] property. This property stores data from file (about 20 KB). Visual studio designer produce for my control code like this:

this.transparentPanel1.Image = new byte[] {
    ((byte)(137)),
    ((byte)(80)),
    ((byte)(78)),
    ((byte)(71)),
    ((byte)(13)),
    ((byte)(10)),
    ((byte)(26)),
    ((byte)(10)),
    ((byte)(0)),
    ((byte)(0)),
    ((byte)(0)),
    ((byte)(13)),
    ((byte)(73)),
    ((byte)(72)),

So, it takes designer about ten seconds to generate property initialization code. I think, right solution for this is to store my byte array in form's resources. But I can't find right way for this. Any ideas?