/// <summary>
        /// Signals the object that initialization is complete.
        /// </summary>
        protected virtual void EndInit()
        {
            //necessary if the background type is gradient since the brush requires the size of the client rectangle
            mView.SetBackgroundType(BackgroundType);

            //the diagram control provider gives problems in design mode. If enable at design mode the
            //diagramming control becomes a container component rather than a form control because the essential
            //properties are disabled through the ControlProvider (the Location or ID for example).
            //Also, do not try to put this in the constructor, you need the ISupportInitialize to get a meaningful DesignMode value.
            if (!DesignMode)
            {
                ControlProvider controlProvider = new ControlProvider();
                TypeDescriptor.AddProvider(controlProvider, typeof(DiagramControlBase));
            }
        }
 public ControlDescriptor(ControlProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("BackColor", typeof(Color));
 }
        /// <summary>
        /// Signals the object that initialization is complete.
        /// </summary>
        protected virtual void EndInit()
        {
            //necessary if the background type is gradient since the brush requires the size of the client rectangle
            mView.SetBackgroundType(BackgroundType);

            //the diagram control provider gives problems in design mode. If enable at design mode the
            //diagramming control becomes a container component rather than a form control because the essential
            //properties are disabled through the ControlProvider (the Location or ID for example).
            //Also, do not try to put this in the constructor, you need the ISupportInitialize to get a meaningful DesignMode value.
            if(!DesignMode)
            {
                ControlProvider controlProvider = new ControlProvider();
                TypeDescriptor.AddProvider(controlProvider, typeof(DiagramControlBase));
            }
        }
示例#4
0
 public ControlDescriptor(ControlProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("BackColor", typeof(Color));
 }