Breaking Change BC4607
Visible to All Users

LightweightBarItemLinkControl objects are used instead of BarItemLinkControl in the Office2016SE and VS2017 themes

In version 18.1, we started to prepare our bar and ribbon controls to switch to optimized templates and changed types of the BarItemLinkControl properties in the context of the BC4415 - The type of BarItemLinkControl properties has been changed to IBarItemLinkControl breaking change.
Starting with 18.2, we have used optimized templates in the Office2016SE and VS2017 themes by default to achieve better performance. When these themes are applied, bar and ribbon controls contain LightweightBarItemLinkControl objects instead of BarItemLinkControl descendants.

This breaking change will cause issues if you reference the following types in your code:
- DevExpress.Xpf.Bars.BarButtonItemLinkControl;
- DevExpress.Xpf.Bars.BarCheckItemLinkControl;
- DevExpress.Xpf.Bars.BarEditItemLinkControl;
- DevExpress.Xpf.Bars.BarItemLinkControlBase;
- DevExpress.Xpf.Bars.BarItemLinkControl;
- DevExpress.Xpf.Bars.BarSplitButtonItemLinkControl;
- DevExpress.Xpf.Bars.BarSplitCheckItemLinkControl;
- DevExpress.Xpf.Bars.BarStaticItemLinkControl;
- DevExpress.Xpf.Bars.BarSubItemLinkControl.

In case you customize the appearance of bar items by overriding theme resources, this customization may be ignored.

To avoid such issues, you can use either of the following options:

- BarItem.UseLightweightTemplates - disables the optimized mode for all links/link controls created for this item.
- BarItemLinkBase.UseLightweightTemplates - disables the optimized mode for a specific link/link control.
CompatibilitySettings.UseLightweightBarItems - disables the optimized mode for all items. This property should be set at the application's startup before loading bar components.

C#
using DevExpress.Xpf.Core; namespace DXSample { public partial class App { static App() { CompatibilitySettings.UseLightweightBarItems = false; } } }
Visual Basic
Imports DevExpress.Xpf.Core Class Application Shared Sub New() CompatibilitySettings.UseLightweightBarItems = False End Sub End Class

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.