473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2420
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Eric | last post by:
According to my book, the padding property is defined for all elements. However, when I set the property for the element <A>, only the left the right padding is applied and not the top and bottom...
21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
13
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
2
by: steve bull | last post by:
I have created a label control and got it to appear in the toolbox. The problem I have is that while all the other properties appear for the contro I can't get the Text property to appear at all. I...
3
by: Eric Newton | last post by:
Given databinding an array of System.Version types: Given that "SomeObject" type has a Version property: public class SomeObject { public Version Version { get; } public string Description {...
1
by: Eric Newton | last post by:
Given databinding an array of System.Version types: Given that "SomeObject" type has a Version property: public class SomeObject { public Version Version { get; } public string Description {...
1
by: --== Alain ==-- | last post by:
Hi, I 'm facing an interesting issue regarding a property and its TypeConverter. When i do not attach a TypeConverter to this property, all custom properties of my custom control are displayed...
1
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. Error was: 'Object reference not set to an...
11
by: Andrus | last post by:
I'm implementing entity object which should populate its properties from database when property is first referenced. In RDL reports I use object properties like MyObject.MyProperty MyObject...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.