Windows Develop Bookmark and Share   
 index > Windows Forms Designer > property grid item collection
 

property grid item collection

hi,
we want to develop a property grid item on the property browser like treeview's node property ( has a browse button that opens a new editor).
is there any special name for this kind of property? we think that this kind of property takes collection.
can we access the .net built-in editor like treenode editor and modify the content of it?

MigrationUser 1  Tuesday, March 18, 2003 11:20 AM
If you want the property browser to display your own editor for, say, property Foo of type BAR then you need to decorate the BAR class w/ this attribute:

[
Editor("BAZ_Editor " , typeof(UITypeEditor))
]
public class BAZ {
}

and here is how a modal BAZ_Editor could be implemented:

public class BAZ_Editor : UITypeEditor {
    public override object EditValue(ITypeDescriptorContext context,  IServiceProvider  provider, object value) {
           // show your modal form here.
    }
    public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext Context ) {
           return UITypeEditorEditStyle.Modal;
    }
}
MigrationUser 1  Friday, March 21, 2003 6:12 PM

You can use google to search for other answers

Custom Search

More Threads

• COMMERCIALLY DESIGNED WEBSITE CANNOT BE UPLOADED PLS HELP
• Snapping controls to a grid in design view
• What is the ideal way to open and close form in windows application?
• Context Menu Size
• local windows in IDE - What control
• How to generate C# code automatically?
• TypeDescriptor.GetProperties and extenderproviders
• Unable to view designer in vs2005 c#
• code generation of my class does not work - please HELP ME
• designer on root component