public override object EditValue(ITypeDescriptorContext context, IServiceProvider sp, object value) { if (m_ui == null) { m_ui = new DockAreasEditorControl(); } m_ui.SetStates((DockAreas)value); IWindowsFormsEditorService windowsFormsEditorService = (IWindowsFormsEditorService)sp.GetService(typeof(IWindowsFormsEditorService)); windowsFormsEditorService.DropDownControl(m_ui); return(m_ui.DockAreas); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (m_ui == null) { m_ui = new DockAreasEditorControl(); } if (value != null) { m_ui.SetStates((DockAreas)value); } var edSvc = (IWindowsFormsEditorService)provider?.GetService(typeof(IWindowsFormsEditorService)); edSvc?.DropDownControl(m_ui); return(m_ui.DockAreas); }