改变devexpress面板控件的边框颜色 [英] Change border color of panelcontrol of devexpress

查看:1579
本文介绍了改变devexpress面板控件的边框颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在winfrom应用程序中使用了DevExpress.XtraEditors.panelcontrol,现在我想通过在button1_Click事件处理程序中编写以下代码来更改它的边框颜色: br $> b $ b

panel1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;

panel1.Appearance.BorderColor = System.Drawing.Color.Red ;



但没有任何反应。

请告诉我,我的错误是什么?

解决方案

您应该使用非皮肤样式之一来为Panel提供边框颜色。也就是说,将控件的LookAndFeel.Style属性设置为Flat,UltraFlat或Style3D。

然后编写以下代码来改变颜色



 panelControl1.Appearance.BorderColor = Color.Red; 


试试这个...... :)

< pre lang =c#> panelControlContainer.Appearance.BorderColor = System.Drawing.Color.Red;


Hi all,
I have used a DevExpress.XtraEditors.panelcontrol in my winfrom application and now i want to change the color of it's border color by writing the following code in button1_Click event handler :

panel1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;
panel1.Appearance.BorderColor = System.Drawing.Color.Red;

But nothing happen.
Please tell me what is my mistake?

解决方案

you should use one of non-skin styles to be able to provide the border color for Panel. That is, set the control's LookAndFeel.Style property to Flat, UltraFlat or Style3D.
then write following code to change color

panelControl1.Appearance.BorderColor =  Color.Red;


Try this...:)

panelControlContainer.Appearance.BorderColor = System.Drawing.Color.Red;


这篇关于改变devexpress面板控件的边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆