Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
How to set backcolor to CellButton when ButtonStyle = Infragistics.Win.UIElementButtonStyle.Button3D
posted

 Hello,

 i have CellButtons with the ButtonStyle Button3d. Everything I do to set the Backcolor doesn`t change the back color of the cell button.

If I set the ButtonStyle to Button3DOldStyle the changing of the back Color works quite fine.

 

I used the following Code:

e.Layout.Bands(0).Override.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Button3DOldStyle
e.Layout.Bands(0).Columns(1).ButtonDisplayStyle = ButtonDisplayStyle.Always
e.Layout.Bands(0).Columns(1).Style = ColumnStyle.Button
e.Layout.Bands(0).Columns(1).CellButtonAppearance.BackColor = Color.Red

 

Cu

tmto 

  • 37774
    Verified Answer
    posted

    When you use the Button3d style, the OS themes are used to render the button, so your appearance settings will be ignored.  If you want to disable this behavior, you can disable it through the UseOsThemes property of the grid.  If you just want to disable OS themes for this column, you can set CellButtonAppearance.ThemedElementAlpha to Transparent.

    -Matt