/// <summary>
        /// Edits the given object value using the editor style provided by GetEditStyle.
        /// </summary>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider is null)
            {
                return(value);
            }

            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (edSvc is null)
            {
                return(value);
            }

            if (_contentUI is null)
            {
                _contentUI = new ContentUI();
            }

            _contentUI.Start(edSvc, value);
            edSvc.DropDownControl(_contentUI);
            value = _contentUI.Value;
            _contentUI.End();

            return(value);
        }
        /// <include file='doc\ContentAlignmentEditor.uex' path='docs/doc[@for="ContentAlignmentEditor.EditValue"]/*' />
        /// <devdoc>
        ///    <para>
        ///       Edits the given object value using
        ///       the editor style provided by GetEditStyle.
        ///    </para>
        /// </devdoc>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            object returnValue = value;

            if (provider != null)
            {
                IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

                if (edSvc != null)
                {
                    if (contentUI == null)
                    {
                        contentUI = new ContentUI();
                    }
                    contentUI.Start(edSvc, value);
                    edSvc.DropDownControl(contentUI);
                    value = contentUI.Value;
                    contentUI.End();
                }
            }

            return(value);
        }