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.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
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 |
---|---|
LayoutControl |
|
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.
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;