Back to Devexpress

UserLookAndFeel.UseDefaultLookAndFeel Property

windowsforms-devexpress-dot-lookandfeel-dot-userlookandfeel-2306b17c.md

latest4.9 KB
Original Source

UserLookAndFeel.UseDefaultLookAndFeel Property

Gets or sets whether the current object’s settings are in effect.

Namespace : DevExpress.LookAndFeel

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[DefaultValue(true)]
[DXCategory("Appearance")]
public virtual bool UseDefaultLookAndFeel { get; set; }
vb
<DefaultValue(True)>
<DXCategory("Appearance")>
Public Overridable Property UseDefaultLookAndFeel As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true to use look and feel settings provided by the parent object or default look and feel object; false to enable this object’s settings.

|

Remarks

If the UseDefaultLookAndFeel property is active and the UserLookAndFeel.ParentLookAndFeel property specifies a non-null value, the object assigned to the UserLookAndFeel.ParentLookAndFeel property specifies look and feel settings.

If the UseDefaultLookAndFeel property value is active and the UserLookAndFeel.ParentLookAndFeel property value is null **null** (Nothing in Visual Basic), an object specified by the UserLookAndFeel.Default property controls look and feel settings. Drop the DefaultLookAndFeel component onto a form to customize the default look and feel settings.

The following code snippet specifies “The Bezier” skin as a default skin:

csharp
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("The Bezier");
vb
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("The Bezier")

If the UseDefaultLookAndFeel property value is deactivated, the UserLookAndFeel.SkinName property specifies the appearance and look and feel of UI controls.

Note

We cannot guarantee correct theming if you deactivate the UseDefaultLookAndFeel property and specify different skins for individual controls. We recommend using a single skin/theme for all controls.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UseDefaultLookAndFeel property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-display-colored-progress-bars/CS/ColoredProgressBar/DifferentRepositoriesProgressBar.cs#L30

csharp
_prbLess25.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
_prbLess25.LookAndFeel.UseDefaultLookAndFeel = false;

winforms-grid-display-colored-progress-bars/VB/ColoredProgressBar/DifferentRepositoriesProgressBar.vb#L37

vb
_prbLess25.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat
_prbLess25.LookAndFeel.UseDefaultLookAndFeel = False
_prbLess50 = New RepositoryItemProgressBar()

See Also

ActiveLookAndFeel

DefaultLookAndFeel

Default

ParentLookAndFeel

UseDefaultLookAndFeel

UserLookAndFeel Class

UserLookAndFeel Members

DevExpress.LookAndFeel Namespace