Hi,
Here is the detailed issue.
Here is my custom control class definition :
[Category("Appearance")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
[Description("Setup Style, Type and Color of gridlines to draw.")]
[TypeConverter(typeof(CGridLineConverter))]
public CGridLine GridLines
{
....
}
and here is my TypeConverter class :
public class CGridLineConverter : ExpandableObjectConverter
{
....
}
and my CGridLine class :
public class CGridLine
{
....
}
When i test m custom control in TestContainer i have the following behavior.
test 1.
If i test it like that, the property "GridLines" from my custom control
is not displayed in the propertyGrid of TestContainer window.
test 2.
If i comment the line
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
and
[TypeConverter(typeof(CGridLineConverter))]
the property "GridLines" is displayed but disable (tge same for its
value field)
test 3.
If i comment the line
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
and
[TypeConverter(typeof(CGridLineConverter))] is not commented.
the "GridLines" property is disbled, but its value field is colored in
black (the full cell in property Grid)
test 4.
If
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]
is not commented
and
[TypeConverter(typeof(CGridLineConverter))] is commented
the "GridLines" property is displayed as accessible, but its value field
displays : ARListView.Design.CGridLine
which correspond to Namespace1.Namespace2.ClassName of my property.
So where is the problem ?
Why property is not displayed when both attributes are "not commented",
so active ?
It's already 4 days that i'm searching and searching without finding
some reason.
thanks a lot for your help,
Al.
--== Alain ==-- wrote:
Hi,
I have a huge problem...
My property does not appear in the "propertyGrid" of "test Container",
when i test my custom control.
Here is the custom control code :
namespace ARListView.Design
{
[DesignTimeVisible(true),
ToolboxItem(true),
ToolboxBitmap(typeof(ARListView.Design.CARListView ),"CARListView.bmp")]
public partial class CARListView : UserControl
{
...
#region Properties - ListView
#region Property : GridLines
[Category("Appearance"),
Browsable(true),
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content),
Description("Setup Style, Type and Color of gridlines to draw.")]
[TypeConverter(typeof(CGridLineConverter))]
public CGridLine GridLines
{
get
{
return this.m_GridLines;
}
set
{
if (value != this.m_GridLines)
{
if (value != null)
{
this.m_GridLines = value;
}
}
}
}
...
}
if i do not place the [TypeConverter(typeof(CGridLineConverter))]
and / or
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content),
my property is displayed but the whole field is colored in black.
What could be the problem ?
thanks a lot,
Al.