Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-give-your-control-a-transparent-background.md
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.7 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How to: Give Your Control a Transparent Background 03/30/2017
transparent backgrounds [Windows Forms], custom controls
custom controls [Windows Forms], transparent background
transparency [Windows Forms], Windows Forms custom controls
32433e63-f4e9-4305-9857-6de3edeb944a

How to: Give Your Control a Transparent Background

In earlier versions of the .NET Framework, controls didn't support setting transparent backcolors without first setting the xref:System.Windows.Forms.Control.SetStyle%2A method in the forms's constructor. In the current framework version, the backcolor for most controls can be set to xref:System.Drawing.Color.Transparent%2A in the Properties window at design time, or in code in the form's constructor.

Note

Windows Forms controls do not support true transparency. The background of a transparent Windows Forms control is painted by its parent.

Note

The xref:System.Windows.Controls.Button control doesn't support a transparent backcolor even when the xref:System.Windows.Forms.ButtonBase.BackColor%2A property is set to xref:System.Drawing.Color.Transparent%2A.

To give your control a transparent backcolor

See also