public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { BrushEditor dlg = new BrushEditor(); dlg.SelectedBrush = value as Brush; if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) return dlg.SelectedBrush; return value; }
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { BrushEditor dlg = new BrushEditor(); dlg.SelectedBrush = value as Brush; if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { return(dlg.SelectedBrush); } return(value); }