开发者

DevX GridControl for WinForms - BorderColor

开发者 https://www.devze.com 2022-12-12 23:59 出处:网络
DevExpress GridControl control for WinForms supports BorderStyle property (through it\'s View), but it seems l开发者_运维知识库ike it doesn\'t support BorderColor. Or am I wrong?

DevExpress GridControl control for WinForms supports BorderStyle property (through it's View), but it seems l开发者_运维知识库ike it doesn't support BorderColor. Or am I wrong?

How can I set BorderColor property for GridControl borders?


You could always set BorderStyle to NoBorder and wrap the GridControl inside a PanelControl.

Set up the properties something like this:

gridControl1.MainView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
panelControl1.LookAndFeel.UseDefaultLookAndFeel = false;
panelControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
panelControl1.Appearance.BorderColor = Color.Red;
panelControl1.Appearance.Options.UseBorderColor = true;
panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;


Are you using skins? The skinning mechanism will most likely override your border color setting unless you disable them.

0

精彩评论

暂无评论...
验证码 换一张
取 消