473,399 Members | 3,919 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,399 software developers and data experts.

About User Controls

Raj
Hi,

I have created a Windows 'user control' in C#.NET. This user control defines
several public 'properties' that the outer world can use to tweak the
behavior of the user control. However, whenver I drag the user control to a
Form, I noticed that the 'Windows Form Designer generated code' contains
several auto generated statments to initialize the 'properties' that are not
proper. This causes the Form designer to get corrupt and shows a designer
error in design mode. This happens each time I build the code!!!

The property that is defined is
public object[] UserControlData
{ set { } get { } }

and it is getting assigned the foll value due to which it is getting
corrupted:
this.expertTimeline1.UserControlData = new object[0] { new System.Double[]
{ 1E+108}, new System.Double[] {1E+108}};

Is there someway to prevent the auto generation of code?
Is there some way to define default values for the properties?
Is there something wrong in the way I am defining the methods?
Thanks & Regards,
Raj

Nov 17 '05 #1
1 2325
Just one post is enough man!

I answered this over in the controls group.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Raj" <ra*************@networkgeneral.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

I have created a Windows 'user control' in C#.NET. This user control
defines
several public 'properties' that the outer world can use to tweak the
behavior of the user control. However, whenver I drag the user control to
a
Form, I noticed that the 'Windows Form Designer generated code' contains
several auto generated statments to initialize the 'properties' that are
not
proper. This causes the Form designer to get corrupt and shows a designer
error in design mode. This happens each time I build the code!!!

The property that is defined is
public object[] UserControlData
{ set { } get { } }

and it is getting assigned the foll value due to which it is getting
corrupted:
this.expertTimeline1.UserControlData = new object[0] { new
System.Double[]
{ 1E+108}, new System.Double[] {1E+108}};

Is there someway to prevent the auto generation of code?
Is there some way to define default values for the properties?
Is there something wrong in the way I am defining the methods?
Thanks & Regards,
Raj

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: William Ryan | last post by:
Well, that depends. http://www.amazon.com/exec/obidos/tg/detail/- /0672320681/qid=1056861878/sr=1-1/ref=sr_1_1/002-7953039- 7491213?v=glance&s=books Is a must read IMHO for any ASP.NET...
1
by: William Ryan | last post by:
Well, that depends. http://www.amazon.com/exec/obidos/tg/detail/- /0672320681/qid=1056861878/sr=1-1/ref=sr_1_1/002-7953039- 7491213?v=glance&s=books Is a must read IMHO for any ASP.NET...
0
by: Jason | last post by:
I am pretty new to C# so bare with me... The design of my website utilizes tables on every page that look almost identical, save the data they are displaying. I have written the code to create...
4
by: Jason | last post by:
I am pretty new to C# so bare with me... The design of my website utilizes tables on every page that look almost identical, save the data they are displaying. I have written the code to create...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.