Back to Devexpress

How to: Make a LayoutControl transparent

windowsforms-3412-controls-and-libraries-form-layout-managers-layout-and-data-layout-controls-examples-how-to-make-a-layoutcontrol-transparent.md

latest1.6 KB
Original Source

How to: Make a LayoutControl transparent

  • Nov 13, 2018

The following code shows how to make a LayoutControl transparent, using the OptionsView.EnableTransparentBackColor property.

csharp
// Make the LayoutControl transparent
layoutControl1.BackColor = Color.Transparent;

//Make Layout Groups transparent
layoutControl1.LookAndFeel.UseDefaultLookAndFeel = false;
layoutControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
layoutControl1.OptionsView.EnableTransparentBackColor = true;
layoutControl1.Root.AppearanceGroup.BackColor = System.Drawing.Color.Transparent;
layoutControl1.Root.AppearanceGroup.Options.UseBackColor = true;

// Prevent embedded controls from inheriting the LayoutControl's look-and-feel.
layoutControl1.OptionsView.ShareLookAndFeelWithChildren = false;
vb
' Make the LayoutControl transparent
LayoutControl1.BackColor = Color.Transparent

' Make Layout Groups transparent
LayoutControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat
LayoutControl1.LookAndFeel.UseDefaultLookAndFeel = False
LayoutControl1.OptionsView.EnableTransparentBackColor = True
LayoutControl1.Root.AppearanceGroup.BackColor = System.Drawing.Color.Transparent
LayoutControl1.Root.AppearanceGroup.Options.UseBackColor = True

' Prevent embedded controls from inheriting the LayoutControl's look-and-feel.
LayoutControl1.OptionsView.ShareLookAndFeelWithChildren = False