Skip to main content
A newer version of this page is available. .

OptionsView.ShareLookAndFeelWithChildren Property

Determines whether the LayoutControl manages the look and feel and style settings of DevExpress .NET controls that are displayed within the LayoutControl.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v18.2.dll

Declaration

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

Property Value

Type Default Description
Boolean **true**

true if the look and feel and style settings of controls are determined by the LayoutControl.LookAndFeel property; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to ShareLookAndFeelWithChildren
DataLayoutControl
.OptionsView.ShareLookAndFeelWithChildren
LayoutControl
.OptionsView.ShareLookAndFeelWithChildren

Remarks

The Layout Control can contain DevExpress WinForms controls that support the look and feel mechanism. The Layout Control provides centralized management of the look and feel settings for such controls. By default, the ShareLookAndFeelWithChildren property is set to true. In this instance, changing the LayoutControl.LookAndFeel property’s settings affects the look and feel of the LayoutControl and embedded controls displayed within the LayoutControl. If the ShareLookAndFeelWithChildren property is set to false, changing the LayoutControl.LookAndFeel property’s settings will not affect the look and feel of the embedded controls. In this instance, the look and feel settings can and must be set up for each control separately.

For BaseControl descendants, style settings can be customized in a centralized way by assinging a StyleController object to the BaseControl.StyleController property. If a control is being used within a LayoutControl, setting its StyleController property to a StyleController object is in effect only if the ShareLookAndFeelWithChildren property is set to false. Otherwise, the control’s style settings are determined by the LayoutControl.

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