I have been trying to do a few things with buttons and such, and for the most part, nothing is happening... well, my blood pressure is going up in a hurry... so something is happening, I lied.
Here is the problem:
The client desires buttons to have different colours, depending on function. For example, green for save, red for cancel, yellow to enter an update mode (the screens will look like Christmas Eve, if you ask me...).
I have even totally disabled the buttons usage of AppStylist and given the button its own color, and it won't change!!!! I am about pulling my hair out.
So I go into AppStylist... oh, this has been such fun... the damned thing won't change anything there, either! I can't get changes to apply to save my life. If someone had a gun on me, I would have asked them to shoot me already. I will literally change the background colour, it shows Properties on the example button, yet nothing happens in the preview canvas!
I am also trying to establish style sets within a single AppStylist library, and that isn't do jack, either.
I just refuse to believe that AppStylist is THAT clumsy to use. I get the feeling I am missing something entirely, but God help me, I haven't a clue.
What gives? Am I totally stupid or does AppStylist hate me that much?
Thanks in advance...
aim123 said:Could this have something to do with the fact that this particular application was upgraded from 2003 to 2005 and also originally used v4.3 of the infragistics controls. I had to delete all designer appearances in order to get the designer in vs.net working again. Another note is that the application is based on the enterprise application model such that the forms are separate to the executable and are loaded at runtime based on an xml resource. The style loader (StyleManager.Load) is defined on the main form (.exe) only! Should it be in each separate dll / form also?
Could this have something to do with the fact that this particular application was upgraded from 2003 to 2005 and also originally used v4.3 of the infragistics controls. I had to delete all designer appearances in order to get the designer in vs.net working again.
Another note is that the application is based on the enterprise application model such that the forms are separate to the executable and are loaded at runtime based on an xml resource. The style loader (StyleManager.Load) is defined on the main form (.exe) only! Should it be in each separate dll / form also?
I can't see how any of that would matter. If there were a problem, then you would not be seeing the styling at all. There's no way some of it could work and some wouldn't.
At this point, I'm really not sure why it's not working. I recommend that you create a small sample project demonstrating that it is not working and Submit an incident to Infragistics Developer Support so they can see why.
Thanks for your response but I'm still not able to override this as expected!
I've tried to modify the Resolution Order of both all components and on the individual control. I've tried setting it to 'Control then Application' and 'Application then Control'. I've attempted to use a simple example like the UltraLabel.
In my application I've tried...
ULTotalOvertimeValue.ForeColor = System.Drawing.Color.DarkRed
and also
Dim appstyle As New Infragistics.Win.Appearance appstyle.ForeColor = System.Drawing.Color.DarkRed ULTotalOvertimeValue.Appearance = appstyle
Neither make any difference (they stay dark grey) but I know that I'm loading the correct template as direct modifications to the style template work!
I need to be able to override both the UltraLabel appearance, ScheduleDayView/time entry and the ScheduleDayHeader appearance. Can you provide any more advice?
What you need to do is change the ResolutionOrder on the component role. This property determines the order of precedence. By default, Application styling overrides the settings on the controls. But you can switch this around.
I'm also encountering issues with the Appstylist. I want to override the default style for the Schedule Day Header. I can set the colour of the background separately to the Appstylist using the old UltraCalanderInfo control. Problem is that the defalt header font colour for theme Template_Glassy.isl is white! This is not good when I colour the background in code (nothing to do with the Appstylist).
I've tried modifying the style using the editor but when I re-load my application there's no difference! I've tried the transparency pointer above but it didn't help.
I think the style sheets are great but why can't we override style in code where applicable. i.e I also want to set the font colour of an UltraLabel to red depending on custom logic, but the runtime code is overridden by the Appstyler. In web css inline style would always override the style sheet. Me thinks this is the wrong way round!
Yea, I figured out the first half - the lack of multiple stylesets... thanks for the insight on the pseudo-inheritance! That might be useful.
That would make for a neat feature, tho. This way, whenever someone wants to have custom colours, they won't have to create several style libraries to support it.