Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,
I am planning to create a listbox type usercontrol. I would like to know how to implement edit items designer verb using custom designer class so that I can 'Add' items to the user control during design time...

Please help me


edit: I added the 'Add' as there appeared to be a word missing in the sentence. DMA
Posted
Updated 13-Nov-11 8:46am
v2
Comments
Sergey Alexandrovich Kryukov 13-Nov-11 18:08pm    
First, tag the UI library: WPF, Silverlight, Forms, what? What's the problem?
--SA

1 solution

If you are talking about WinForms: the best systematic explanation of how you go about adding design-time support for things like Actions and Designer Verbs in a custom control I've come across is in the 2004 edition of Matthew MacDonald's "Pro .NET 2.0 Windows Forms and Custom Controls in C#" (APress).

On CP check out:[^].

On MSDN:[^]

This is, imho, a non-trivial task.

You might keep in mind that defining a public Enum, and then putting a public property in your custom control, whose type is the type of that public Enum will result in the presence in the Properties Editor at design-time ... for an instance of that custom control dragged onto a Form ... in a ComboBox selection for that entry in the Properties Editor.

That's an easy win.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900