public override object EditValue( ITypeDescriptorContext context, IServiceProvider provider, object value) { // Attempts to obtain an IWindowsFormsEditorService IWindowsFormsEditorService edSvc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (edSvc == null) return value; // Displays a drop-down control BrushEdit editForm = new BrushEdit(); editForm.Brush = value as MindFusion.FlowChartX.Brush; edSvc.DropDownControl(editForm); Brush newValue = editForm.Brush; editForm.Dispose(); GC.Collect(); if (newValue != null) return newValue; return value; }
public override object EditValue( ITypeDescriptorContext context, IServiceProvider provider, object value) { // Attempts to obtain an IWindowsFormsEditorService IWindowsFormsEditorService edSvc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (edSvc == null) { return(value); } // Displays a drop-down control BrushEdit editForm = new BrushEdit(); editForm.Brush = value as MindFusion.FlowChartX.Brush; edSvc.DropDownControl(editForm); Brush newValue = editForm.Brush; editForm.Dispose(); GC.Collect(); if (newValue != null) { return(newValue); } return(value); }