We use "NetAdvantage for .NET 2007 Vol. 3 CLR 2.0"We have an app that uses UltraButton from the above version. This is currently running on Windows XP. Any background color set on this button shows up fine when rendered. Now, we are moving to Windows 7 and testing our app on this new OS. We see the background color of this button not shown as set. It's simply shows in grey. ANy help on this appreciated.Thank you.
joshrodman said:My experience with my project is that UseOsThemes does not work to suppress styling on an UltraButton in Windows 7. You have to use the AppStylist to suppress themes. The good news is this is fairly simple: creating a simple app style file and then "Load"ing it in your Form.Load.
I tried this out and it works just fine for me. What does your UltraButton look like on Windows 7 when you set UseOsThemes to false? Mine looks like a squared 3d button, which is exactly what it should look like.
joshrodman said:Side note on app stylist: if your project tries to load a style file and can't find it for some reason, expect the app to crash mighty fast (this was my experience).
If you try to access a file that cannot be found, you will, of course, get a FileNotFound exception. That's correct behavior and the same thing happens with any method that loads a file when the file is not found.
joshrodman said:Going back to the original "solution": the problem for me is (and I'm opening a support ticket to address this) that AppStylist conflicts with DrawFilter and also we'd opted to disable AppStyling because it caused other issues. Now we're having to revisit those other issues and remediate as best we can.
What do you mean by "AppStylist conflicts with a DrawFilter". AppStylist just changes the appearance resolution and sometimes some property resolution for a control. So it cannot 'conflict' with a DrawFilter.
My guess is that something in your Style Library is changing the resolution of how a particular control is drawing and your DrawFilter is making assumptions about the structure of the UIElements which is no longer true once you apply the style. So in rare cases, you might have to adjust your DrawFilter to account for a change in the elements, but the same thing applies to changing properties on a control.
In the vast majority of cases, AppStylist doesn't really do anything to a control that you cannot already do via a property setting, it's just a matter of making it more encapsulated.
My experience with my project is that UseOsThemes does not work to suppress styling on an UltraButton in Windows 7. You have to use the AppStylist to suppress themes. The good news is this is fairly simple: creating a simple app style file and then "Load"ing it in your Form.Load.
Side note on app stylist: if your project tries to load a style file and can't find it for some reason, expect the app to crash mighty fast (this was my experience). Going back to the original "solution": the problem for me is (and I'm opening a support ticket to address this) that AppStylist conflicts with DrawFilter and also we'd opted to disable AppStyling because it caused other issues. Now we're having to revisit those other issues and remediate as best we can.
Hi,
When you are using an operating system that supports Themes, like Windows 7, the themed drawing will override any other settings. And the system themes are all or nothing, you cannot change the individual colors.
So if you want to change the BackBolor of a button, you have to turn off themes on the controls.
You can do this on any individual Infragistics WinForms controls by setting it's UseOsThemes property to false.
Or, you can turn off themes in your whole application using AppStylist.