public override object EditValue(ITypeDescriptorContext context,
IServiceProvider provider, object value)
{
if (context != null && context.Instance != null && provider != null)
{
edSvc = (IWindowsFormsEditorService) provider.GetService(typeof
(IWindowsFormsEditorService));
if (edSvc != null)
{
var style = (TextStyle) value;
using (var tsd = new TextStyleDesignerDialog(style)
)
{
context.OnComponentChanging();
if (edSvc.ShowDialog(tsd) == DialogResult.OK)
{
ValueChanged(this, EventArgs.Empty);
context.OnComponentChanged();
return style;
}
}
}
}
return value;
}