2016-11-20 6 views
0

Devexpress SimpleButton을 사용하여 사용자 지정 단추를 수행했지만이 단추의 색을 변경하려고하지만 작동하지 않습니다.C# 사용자 지정 SimpleButton 변경 색

 this.Button.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple; 
     this.Button.BackColor = Color.Pink; 

나는 디자이너와 동일한 작업을 수행했으나 정상적으로 작동하지만 프로그래밍 방식으로 작업하기를 원하지만 작동하지 않습니다. 미리 감사드립니다.

답변

2

확인, 울트라 플랫 또는 Style3D 평면에 LookAndFeel.Style을 설정합니다 :

this.Button.LookAndFeel.Style = LookAndFeelStyle.Flat; 
this.Button.LookAndFeel.UseDefaultLookAndFeel = false; 
this.Button.Appearance.BackColor = Color.MediumSeaGreen; 
this.Button.Appearance.Options.UseBackColor = true; 
+0

을 그것은 완벽하게 잘 작동, 감사합니다! – mrvinent