S
Simon
Hi
I have developed a custom webcontrol like a Table (A) with a rows collection
property (collection derived from CollectionBase) where I put one or more
custom webcontrol (B).
I need to hide some public property on controls (A) & (B) when in Design
Mode.
For the control (A) I have create class derived from ControlDesigner, I have
override the PostFilterProperties method typing inside some code for
removing the properties from properties dictionary, and after I have set
Designer attribute on class declaration for the control (A) and this work
fine. (see source code)
For the control (B) I try to make same technique but this don't work on
CollectionEditor form.
Plwase if some one have some sample code to do this, please reply to me.
Thanks in advance
Simon.
--------------------------------------------
public class Control_A_Designer : ControlDesigner
{
public Control_A_Designer()
: base()
{
}
protected override void PostFilterProperties( IDictionary properties)
{
properties.Remove( "BackColor");
base.PostFilterProperties( properties);
}
}
[
Designer( "Test.Control_A_Designer, Test", typeof( IDesigner)),
]
public class Control_A : WebControl
{
...
...
}
I have developed a custom webcontrol like a Table (A) with a rows collection
property (collection derived from CollectionBase) where I put one or more
custom webcontrol (B).
I need to hide some public property on controls (A) & (B) when in Design
Mode.
For the control (A) I have create class derived from ControlDesigner, I have
override the PostFilterProperties method typing inside some code for
removing the properties from properties dictionary, and after I have set
Designer attribute on class declaration for the control (A) and this work
fine. (see source code)
For the control (B) I try to make same technique but this don't work on
CollectionEditor form.
Plwase if some one have some sample code to do this, please reply to me.
Thanks in advance
Simon.
--------------------------------------------
public class Control_A_Designer : ControlDesigner
{
public Control_A_Designer()
: base()
{
}
protected override void PostFilterProperties( IDictionary properties)
{
properties.Remove( "BackColor");
base.PostFilterProperties( properties);
}
}
[
Designer( "Test.Control_A_Designer, Test", typeof( IDesigner)),
]
public class Control_A : WebControl
{
...
...
}