public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value) { IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; SwxToolTip tip = value as SwxToolTip; if (svc != null && tip != null) { using (ToolTipEditorForm form = new ToolTipEditorForm()) { if (svc.ShowDialog(form) == DialogResult.OK) { MessageBox.Show(String.Format("tooltipeditor::{0}|{1}", form.HeaderText, form.ContentText)); tip.HeaderText = form.HeaderText; // update object tip.ContentText = form.ContentText; } } } return tip; // can also replace the wrapper object here }
public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value) { IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; SwxToolTip tip = value as SwxToolTip; if (svc != null && tip != null) { using (ToolTipEditorForm form = new ToolTipEditorForm()) { if (svc.ShowDialog(form) == DialogResult.OK) { MessageBox.Show(String.Format("tooltipeditor::{0}|{1}", form.HeaderText, form.ContentText)); tip.HeaderText = form.HeaderText; // update object tip.ContentText = form.ContentText; } } } return(tip); // can also replace the wrapper object here }