473,750 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Design time editors and CodeDom serialization

Hello groovers,

I have a component which i'm trying to add some design time support to. I
wish to add design time support so that a readonly collection of
ToolStripItems can be maintained via a collection editor however i only wish
to expose the following interface to the design time editor. Also the editor
that maintains the readonly collection can only add ToolStripItems that
already exist on the parent form that contains the component and cannot
create new ToolStripItems:

public CommandActionLi st
{

public ReadOnlyCollect ion<ToolStripIt emControls
{
get;
}

public void AddControl(Tool StripItem value) {}

public void RemoveControl(T oolStripItem value) {}

}

I've created a class:

CommandActionLi stCodeDomSerial izer : CodeDomSerializ er
{
public override object Serialize(IDesi gnerSerializati onManager manager,
object value) {}
}

which serializes the objects in the collection into the
InitializeCompo nent() method, ie the Serialize(...) method generates lines
of code similiar to the following for each item in the Controls collection:

this.fooCommand ActionList.AddC ontrol(fooToolS tripItem);

what i'm unsure of is how to create the editor:

Should i be deriving from UITypeEditor, or CollectionEdito r, instead of
exposing a Readonly collection should i implement ICustomTypeDesc riptor to
expose a property which can be maintained?

thanks
AP Farszha
Oct 31 '06 #1
0 1161

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

Similar topics

0
1921
by: Ron Bullman | last post by:
Hi, I havent been able to find any documentation about @ in the CodeDom context. The problem is when generating C# code from CodeDom it will associate a @-tag with all C# specific types. Why? And how to configure the CodeDom to generate code without @-tags? Ron A short example follows whic produces following kind of output:
1
1278
by: Jack S | last post by:
Hi, I am currently working on an winforms client app. It has three main forms for user input. I am having trouble with a good design for persisting the user input. The user input will be used through out the program for some calculations and eventually will be saved to file. Right now my design is to have a controller/process class for each UI form. Also, I want the file to be an xml file. So, should I just create a container class...
4
2003
by: Vagmi Mudumbai | last post by:
Hi, I am working on CodeDOM to generate a more usable class to serialize and deserialize WXS files. I have hit the wall at a pretty early stage. :-( I am attempting to change the member public fields into properties. I have written a generic field to property code for that. It is almost straight out of the link that you gave me. :-) But that always creates code with the virtual keyword. I am not sure on how to get rid of it. For...
0
4736
by: DotNet Guerrilla | last post by:
I deployed an application to our production server that has one web service reference and I am getting the following error. In my dev laptop work fine the error is in our prod server. Please advice System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark) at...
16
7091
by: marktxx | last post by:
I've finally gotten around to reading the book "Large-Scale C++ Software Design" by John Lakos. Has anyone documented what parts of this book are now obsolete due to C++ language changes such as namespaces? or are now generally considered bad advice? Feel free to reply here on a particular topic discussed in the book. I also noticed that John Lakos has a book in preparation called "Scalable C++: Component-Based Development" maybe this...
2
2377
by: Paul Cheetham | last post by:
Hi, I have moved an application from VS2003 to VS2005, and I am now unable to view most of my forms in the designer. The majority of the forms in my project are derived from class PACForm, (which itself derives from System.Windows.Forms.Form) Whenever I try to open on of these forms in the designer, I get an error, stating it is unable to load one or more of the requested types. (Full text at the bottom of this message)
12
2794
by: cmk128 | last post by:
Hi I am an os developer, i am developing a gui library. I found that java swing is the most easiest to use gui library , am i correct? I am trying to port swing to c++, is there any thing i should be careful? thanks from Peter (cmk128@hotmail.com)
3
1556
by: --== Alain ==-- | last post by:
Hi, I've created a Form just for testing purposes. on this form i have a custom control that i created. Every time that i update my custom control (dll file), my test form displays the following message : "One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project,
2
3169
by: teixeira1985 | last post by:
Hi , Due an unknown cause VS2005 started to show an error when i switch from code to design in windows forms projects. I repaired the installation but the same happens. The error is: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.
0
8997
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9568
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.