0
Answer

Designer Serializes dynamic created Controls

blabla

blabla

16y
2.2k
1
Hi, my Situation is the following: I have a conncectionManger class, that manages various Database Connections. I am also working with a Ribbon UI, however the same concept would apply to Containers. I am creating now a front end for this Connection Manager. The idea is to have a Component, lets call it cmComponent that has a property of type RibbonGroup, where it takes a ribbon group to wich it adds all the controls that are needed to manage the connections. The problem is now that these Controls are added to the group at runtime and the Designer creates member vars and property assignments for these dynamically created Controls, also it shouldnt. The Controls are private members of the class and i tried marking them with the DesignerSerializationVisibility.Hidden Attribute. I had the impression it worked once but i never got it running again. So what is the way to prevent the designer from serializing dynmaic created Controls?