Questions tagged [collectioneditor]

The collection editor allows to edit collections in the property grid at design time.

The class System.ComponentModel.Design.CollectionEditor allows to edit collections in the System.Windows.Forms.PropertyGrid at design time.

57 questions
8
votes
2 answers

How do you create a custom collection editor form for use with the property grid?

I am trying to incorporate a property grid control with a class that has a list/collection of another class as one of the properties. Lets call them class A and the list would be containing class B for reference. I was wanting to incorporate a form…
Nathan Raley
  • 455
  • 1
  • 7
  • 16
8
votes
3 answers

CollectionEditor yielding "Object does not match target type." for System.Drawing.Point

I have a custom control which has a property of type Collection. When I use CollectionEditor to edit this property, the CollectionEditor window shows "Object does not match target type." for the "X" and "Y" properties. But if I…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
5
votes
1 answer

Design-time editor support for controls collection

I'd like to add a property which represents a collection of controls to a component and have a collection editor with which I can easily select the controls that belong to the collection. VS does almost what I want automatically with the following…
Tom Juergens
  • 4,492
  • 3
  • 35
  • 32
3
votes
1 answer

CollectionEditor and "Code generation for property '****' failed" Error Message

I have a user control that uses a property with CollectionEditor. And I'm using another project in the same solution to test the control. My collection editor works without a problem, except the IDE gives the error in design-time after I recompiled…
oruchreis
  • 866
  • 2
  • 12
  • 28
3
votes
1 answer

CollectionEditor's Parent

I have a property like that: [Editor(typeof(LayerCollection), typeof(UITypeEditor))] public List Layers { get { return layers; } } And I have a LayerCollection class that derived from CollectionEditor. And this Layers property is in…
oruchreis
  • 866
  • 2
  • 12
  • 28
3
votes
0 answers

How to add icons to the standard Collection Editor?

I have a custom control which utilizes TCollection and TCollectionItem. In the collection editor, I would like to add icons to each list item, which is sourced by an internal TImageList (inside its parent component). The collection items themselves…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
3
votes
2 answers

Is there any way to use a CollectionEditor outside of the property grid?

I'm replacing my property grid with something that will allow me to customize my UI a bit better. I placed a button on my form that I hope when clicked would pop up a CollectionEditor and allow me to modify my code. When I was using the…
Jason Thompson
  • 4,643
  • 5
  • 50
  • 74
3
votes
2 answers

How to add validation to PropertyGrid's CollectionEditor?

I'm using PropertyGrid to edit an object containing a collection. Collection is edited using the CollectionEditor. I have to make sure elements in collection are unique. How can I add validation to CollectionEditor: By either overloading…
JBeurer
  • 1,707
  • 3
  • 19
  • 38
3
votes
2 answers

Collection Editor data lost at design time

I'm trying to make a WinForms usercontrol with a Collection as a property (Where T stands for some custom classes). I already read a lot about this topic, however I can't let this work properly at design time (at runtime everything works fine).…
user1176420
  • 113
  • 2
  • 9
3
votes
1 answer

Passing an object to a collection editor

I'm trying to build a check list for a ToolStripMenuItem that automatically handles the checking and unchecking of an item and then I provide an event to the programmer allowing them to handle what happens next. If something like this already…
3
votes
1 answer

How do you customize the descriptions in the Collection Editor of the PropertyGrid object?

I have a class that contains several public properties. One of those properties is a List containing instances of another class. It breaks down something like this: namespace Irig106Library.Filters.PCM { [Description("Definition")] public…
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
3
votes
0 answers

PropertyGrid how to show a Collection as a property?

For a class that has a collection as one of its fields List myList, the PropertyGrid would show the value as Collection and launch the Collection Editor when clicked. Is it possible to make that instead an expandable property where each…
Alex
  • 561
  • 2
  • 9
  • 28
2
votes
1 answer

Set position for custom CollectionEditor form in WinForms

I wrote a custom collection editor for a WinForms control. Its core code looks like this: internal class MyCollectionEditor : CollectionEditor { public MyCollectionEditor(Type type) : base(type) { } protected override…
TecMan
  • 2,743
  • 2
  • 30
  • 64
2
votes
1 answer

Xceed Property Grid : Collection Editor Not Expanding In Proper Manner

I have used the Xceed Property Grid. I have used the Collection Editor from Xceed for Collections in this Property Grid. [Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))] [Serializable] public class Variable { //Properties in…
2
votes
2 answers

How to make CollectionEditor to fire CollectionChanged event when items added or removed?

I have this custom control that I grabbed from somewehere long ago: public class NotifyingCollectionEditor : CollectionEditor { // Define a static event to expose the inner PropertyGrid's PropertyValueChanged event args... public delegate…
Kosmo零
  • 4,001
  • 9
  • 45
  • 88
1
2 3 4