471,610 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

Why property does not appear in TEST Container :-(

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.

Feb 12 '07 #1
1 2309
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.
Feb 12 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Eric | last post: by
2 posts views Thread by steve bull | last post: by
1 post views Thread by Eric Newton | last post: by
1 post views Thread by --== Alain ==-- | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.