Hi Andrea,
Apply the designer class to your custom control class like :
[Designer(typeof(SampleDesigner))]
Here's the code of the Designer class :
public class SampleDesigner : ControlDesigner
{
protected override void PostFilterProperties(System.Collections.IDictionary
properties)
{
foreach(string prop in _unneededProperties) properties.Remove(prop);
base.PostFilterProperties(properties);
}
private static readonly string[] _unneededProperties = {
"Anchor",
"BackColor",
"CausesValidation",
"Dock",
"ImeMode",
"Location",
"Size",
"TabIndex",
"TabStop",
"AccessibleDescription",
"AccessibleName",
"AccessibleRole",
"AllowDrop",
"Enable",
"Visible",
"Enabled",
"Locked",
"AutoScroll",
"AutoScrollMargin",
"AutoScrollMinSize",
"DockPadding",
"ContextMenu",
"RightToLeft",
"BackgroundImage",
"Tag"
};
}
Hope it helps...:)
Regards,
?zden
> ?zden
>
[quoted text clipped - 3 lines]
> Thanks
> Andrea
Andrea Moro - 05 Aug 2004 14:05 GMT
?zden,
I'm using VB, but this isn't the main problem.
I'm inheriting from a usercontrol, so controldesigner
isn't available for me.
I've the same problems, trying to overlads the
OnSetComponentDefaults.
It's a member of system.design.componentmodel ...
I'm loosing in a glass of water ... or in a ocean ...
I don't know.
Andrea