public override object EditValue(ITypeDescriptorContext context,
                                         IServiceProvider provider,
                                         object value)
        {
            if ((context == null) || (provider == null))
            {
                return(base.EditValue(context, provider, value));
            }

            // Access the Property Browser's UI display service
            IWindowsFormsEditorService editorService =
                (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (editorService == null)
            {
                return(base.EditValue(context, provider, value));
            }

            // Create an instance of the UI editor form
            IReportItem iri = context.Instance as IReportItem;

            if (iri == null)
            {
                return(base.EditValue(context, provider, value));
            }
            PropertyImage pre = iri.GetPRI() as PropertyImage;

            PropertyImageI pbi = value as PropertyImageI;

            if (pbi == null)
            {
                return(base.EditValue(context, provider, value));
            }

            using (SingleCtlDialog scd = new SingleCtlDialog(pre.DesignCtl, pre.Draw, pre.Nodes,
                                                             SingleCtlTypeEnum.ImageCtl, null))
            {
                ///////
                // Display the UI editor dialog
                if (editorService.ShowDialog(scd) == DialogResult.OK)
                {
                    // Return the new property value from the UI editor form
                    return(new PropertyImageI(pre));
                }

                return(base.EditValue(context, provider, value));
            }
        }
 internal PropertyImageI(PropertyImage pi)
 {
     _pi = pi;
 }
 internal PropertyImageI(PropertyImage pi)
 {
     _pi = pi;
 }