Skip to main content

OptionsView.EnableTransparentBackColor Property

Allows the parent’s background to be seen through the LayoutControl.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(true)]
public bool EnableTransparentBackColor { get; set; }

Property Value

Type Default Description
Boolean true

true if the parent’s background is seen through the LayoutControl; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to EnableTransparentBackColor
LayoutControl
.OptionsView .EnableTransparentBackColor

Remarks

This property enables the transparency process which is supported by the LayoutControl. If you need an image to be seen through the LayoutControl do the following:

  • set the form’s BackgroundImage property to the required image;
  • set the LayoutControl’s EnableTransparentBackColor property to true;
  • enable the Flat, UltraFlat, Style3D, Office2003 or WindowsXP paint scheme via the LayoutControl.LookAndFeel property;
  • Specify transparent or semi-transparent colors to use when painting various elements of the LayoutControl. Use a layout group’s Appearance… properties to customize the appearance settings. A translucent color is specified by four components: ARGB, where A is the alpha channel, and R, G and B are Red, Green and Blue components.

Note

Setting the EnableTransparentBackColor property to true reduces the control’s painting performance.

Note

The transparency feature is not supported in skinning painting schemes.

Example

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

// 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;
See Also