|
Hi, I used FormDesigner from #Develop in my test application. I have a problem when I try to deserialize (XML --> design), that controls, which have visible=false are not displayed on the design form. I think the problem comes, when control is created and placed in a container where comes its designer initialization. After that, all its properties are deserialized and set on this new object.
I call it like: // ... this creates component and places it in design container host.CreateComponent(newObject.GetType(), componentName);
// ... here we set properties like position, size etc. including visible // after this, control is invisible when set to false SetUpObject(newObject);
--------------------------------------- in container class (public class DesignComponentContainer : IContainer) is a method: public void Add(IComponent component, string name) { ... component.Site = new ComponentSite(host, component); designer = TypeDescriptor.CreateDesigner(component, typeof(IDesigner)); designer.Initialize(component); } --------------------------------------- I tried to setup the object first and then to add it to the container, but it didn't work at all.
So, after all this long description comes my question - when should I set properties of the control (mainly visible attribute) so that I can see it on the FormDesigner, but so that PropertyBrowser display correct value of false?
I hope that people who know about Design Time can understand me...
thanks for any help |