public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { // Uses the IWindowsFormsEditorService to display a // drop-down UI in the Properties window. IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService) provider.GetService(typeof (IWindowsFormsEditorService)); if (edSvc != null) { MaterialTreeViewEditorControl view = new MaterialTreeViewEditorControl(); // Display an angle selection control and retrieve the value. edSvc.DropDownControl(view); if (view.SelectedMaterial != null) { return view.SelectedMaterial; } } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { // Uses the IWindowsFormsEditorService to display a // drop-down UI in the Properties window. IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { MaterialTreeViewEditorControl view = new MaterialTreeViewEditorControl(); // Display an angle selection control and retrieve the value. edSvc.DropDownControl(view); if (view.SelectedMaterial != null) { return(view.SelectedMaterial); } } return(value); }