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 BasicImports DevExpress.Xpf.Core
Class Application
Shared Sub New()
CompatibilitySettings.UseLightweightBarItems = False
End Sub
End Class