Back to Devexpress

OptionsView.ShareLookAndFeelWithChildren Property

windowsforms-devexpress-dot-xtralayout-dot-optionsview-1bfe28ee.md

latest4.3 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
public bool ShareLookAndFeelWithChildren { get; set; }
vb
<DefaultValue(True)>
Public Property ShareLookAndFeelWithChildren As Boolean

Property Value

TypeDefaultDescription
Booleantrue

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 TypePath to 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.

Example

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

See Also

LookAndFeel

Look and Feel

OptionsView Class

OptionsView Members

DevExpress.XtraLayout Namespace