Forum Discussion

youran's avatar
youran
Copper Contributor
Aug 23, 2023

Regarding the issue of attaching a ControlDesigner to a control...

After attaching a ControlDesigner to a Button, the background of the Button becomes transparent in the designer, but the BackColor remains 240, 240, 240

 

 

 

[DesignerAttribute(typeof(DemoDesigner))]
    public class DemoButton : Button
    {

    }
    public class DemoDesigner : ControlDesigner
    {
        public override void Initialize(IComponent component)
        {
            base.Initialize(component);
        }
    }

 

 

 

 

  • Hi youran,

    You can try below line:

    demoButton.BackColor = Color.FromArgb(240, 240, 240);

    Thanks & Best Regards,
    AddWebSolution

Resources