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; } } |