【问题标题】:Devexpress change Style (SkinRibbonGalleryBar) in CodeDevexpress 在代码中更改样式(SkinRibbonGalleryBar)
【发布时间】:2015-02-09 07:10:47
【问题描述】:

我需要自定义我的 WinForms 应用程序。 我在设计器中使用了 SkinRibbonGalleryBar-item 来更改运行时的布局,例如更改为“Devexpress Dark Style”。 但是如何在开发时更改该布局? 这样就没有对话框可供选择,而是从一开始就设置了样式?

【问题讨论】:

    标签: c# winforms layout devexpress


    【解决方案1】:
    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;
    }
    

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

    【讨论】:

    • 感谢@PeterStone 的帮助。当我使用 Devexpress 时,我无法使用 Teleriks 控件。而且我没有任何命令,例如 Devexpress.Controls 或 Devexpress.WinControls。我如何使用 Devexpress 解决这个问题?
    • 这还不行。我有与上面相同的代码并添加了程序集,但它并没有改变任何东西
    • 使用外观组件怎么样? documentation.devexpress.com/#windowsforms/…
    • hmm 我的表单上有一个 gridControl,它实际上正在发生变化。但表单本身和任何其他控件都保持不变。
    • 这篇文章documentation.devexpress.com/#WindowsForms/CustomDocument2534 说我可以在控件“lookandfell”设置中更改皮肤,我这里没有
    猜你喜欢
    • 2015-03-15
    • 2019-01-12
    • 1970-01-01
    • 1970-01-01
    • 2010-12-30
    • 1970-01-01
    • 2021-08-24
    • 2023-03-20
    • 2015-12-21
    相关资源
    最近更新 更多