I'm having trouble changing the back color on an UltraButton in a Windows Form. With the following code, the button does not display with the set color. What property should I use?
UltraButton newUltraButton = new UltraButton();newUltraButton.Appearance.BackColor = Color.Azure;newUltraButton.Parent = this;
I am using NetAdvantage for .NET 2008 Vol. 3 CLR 2.0
John
I had trouble with this, and though Vince's code didn't work for me, it put me on the right track. Thanks!
I eventually found solace with:
newUltraButton.UseAppStyling = False
Chances are high that a Windows Theme is overriding the background color you're selecting. See if adding the following line of code addresses your issue:
newUltraButton.Appearance.ThemedElementAlpha = Infragistics.Win.Alpha.Transparent;
Note that this essentially turns off Windows Themes for the control, which may cause it to appear differently.
If that doesn't address the issue, then you may be using an application style that uses a background image, which would prevent the background color from being displayed.