Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在代码中更改样式(SkinRibbonGalleryBar)_C#_Winforms_Layout_Devexpress - Fatal编程技术网

C# 在代码中更改样式(SkinRibbonGalleryBar)

C# 在代码中更改样式(SkinRibbonGalleryBar),c#,winforms,layout,devexpress,C#,Winforms,Layout,Devexpress,我需要自定义我的WinForms应用程序。 我在设计器中使用SkinRibbonGalleryBar项在运行时更改布局,例如更改为“Devexpress深色样式”。 但是,在开发过程中如何更改布局? 这样就没有对话框可供选择,但样式是从头开始设置的 using DevExpress.LookAndFeel; { // Access the Default LookAndFeel. UserLookAndFeel defaultLF = UserLookAndFeel.Default; // E

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

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;
}

使用look-and-feel可能会有所帮助。参考:

谢谢@PeterStone的帮助。由于我使用的是Devexpress,因此无法使用teleriks控件。我没有像Devexpress.Controls或Devexpress.WinControls这样的命令。我怎样才能用Devexpress解决这个问题?这还不起作用。我有与上面相同的代码并添加了程序集,但它没有改变任何东西。使用lookandfeel组件怎么样?嗯,我的表单上有一个gridControl,它实际上正在改变。但是表单本身和任何其他控件都保持不变。本文说我可以在控件“lookandfell”设置中更改外观,这里没有