Hi !
I'm currently trying to create my own skin system for my personal controls after discovered Devexpress and others solutions. I haven't tried these solutions, but I think the following system is good:
-I create a component (inherits from Component) named "Skin". This component can be placed in the components tray at the bottom of the designer and it can be attached to all my controls (or just some). All my controls have a "Style" property.
So, when I change properties at design time in an instance of my "Style" component, I want all my custom controls (these who are attached to this style) be updated.
For interacting between my "Style" component and "linked controls", I have a public "LinkedControls" property "List(Of Control)" in my Style component. Each time I modify a style property, I loop on all controls in tis list and refresh them.
All works fine, except I have a serialization error when I recompile my app. After many searches, it seems generic collection aren't supported at design time :(
So my questions are:
- Is my system good if I use non generic collection for my "LinkedControls" property in my "Style" component ?
-Is it good to serialize complete controls ? I just need to refresh the "Style" property to refresh them, so is it best to only store controls names in the "LinkedControls" and loop on all controls on my forms ?
I ask this question because I have read that serializing big objects is not good.
So, what do you think about my system ?
How Devexpress and others solutions work ?
I have special things to do if I use a non-generic collection for my "LinkedControls" property ?
Thanks in advance for your help ... and sorry for my bad english