Devexpress在代码中更改样式(SkinRibbonGalleryBar)

Devexpress change Style (SkinRibbonGalleryBar) in Code

我需要自定义我的 WinForms 应用程序。 我在设计器中使用 SkinRibbonGalleryBar-item 来更改运行时的布局,例如 "Devexpress Dark Style"。 但是如何在开发时更改布局? 以至于没有对话框可以选择但是样式是从头设置的?

using DevExpress.LookAndFeel;
{
// Access the Default LookAndFeel. 
UserLookAndFeel defaultLF = UserLookAndFeel.Default;
// Ensure that the Office2003 painting scheme will be used. 
defaultLF.UseWindowsXPTheme = false;
defaultLF.Style = LookAndFeelStyle.Office2003;
// Ensure that the Default LookAndFeel will be applied. 
xtraTabControl1.LookAndFeel.UseDefaultLookAndFeel = true;
// Remove the Parent LookAndFeel (if any). 
xtraTabControl1.LookAndFeel.ParentLookAndFeel = null;
}

使用外观可能会有所帮助 Ref: https://documentation.devexpress.com/#windowsforms/CustomDocument2412