CompatibilitySettings.UseLightweightTemplatesInStandardButtons Property

Gets or sets whether the dx:ButtonThemeKey resource containing the Button template should use the ResourceKey=ButtonControlTemplate.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Data.Desktop.v21.1.dll

Declaration

public static bool UseLightweightTemplatesInStandardButtons { get; set; }

Property Value

Type Description
Boolean

true, to use ResourceKey=ButtonControlTemplate in the dx:ButtonThemeKey resource; otherwise false.

Remarks

Modern themes (VS2017, Office2016SE, Office2019, Windows10, VS2019) now use new lightweight templates for the Button, TextBox, ListBox, CheckBox, ProgressBar, ScrollViewer, and Slider controls. Lightweight templates have better performance and support appearance customization properties that didn’t work before. This leads to the following changes:

  1. The BorderBrush, Background, Foreground, and BorderThickness properties now work in all controls. If you set one of these properties previously and did not notice any difference, the appearance of your application may change after the upgrade.
  2. The internal {dx:ButtonThemeKey ResourceKey=ButtonControlTemplate} resource containing the Button template is not used any more - standard Buttons use the {dx:ButtonThemeKey ResourceKey=LightweightTemplate} resource instead. If you changed this resource in previous versions and want to keep your modifications, set the UseLightweightTemplatesInStandardButtons property to false.

Refer to the following breaking change ticket for more information on the UseLightweightTemplatesInStandardButtons compatibility property: BC4284.

See Also