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
290
Overwrite Stylesetting
posted

Hi,

 

i have a problem with the BackColor Property. First a little bit about my problem.

 

I want to write a program which should display several Toolbars with different elements. I am using a StyleLibary to get the same design in all programs. Now I want to change the backcolor just for some of the elements on the toolbar. For the settings that a are not in stylelibary everything works fine, but if the property i want to change is in the stylelibary nothing happened if i change the value in the program.

How can i realize it, to overwrite the setting of the stylelibary?

Thanks for Help

 

P.S. Sorry for my bad english i am little bit out of training, hope you understand what i want to say.

Parents
  • 469350
    Offline posted

    Hi,

    Typically, the AppStylist setting overrides any settings in the application. There is really not way around this. This is the way it has to work in order for AppStylist to be useful.

    You can change this behavior in the Application Style Library by setting the ResolutionOrder property on a Component Role. But this means that all settings in the applications will take precedence over the AppStylist setting. It's all or nothing, you cannot control this for an individual property or setting.

    Appearance settings for individual objects will override AppStylist settings, though. For example, if you apply a BackColor to a single Button on a toolbar, it makes sense that that BackColor would be honored since AppStylist styles the application at a more general level.

    You might be able to acheive what you want using StyleSets. Your Application Style Library could contain a base StyleSet that applies to all toolbars and then derived StyleSets which pick up the base properties, but have different, more specific, settings for some UIRoles. Then you could specify a StyleSetName on each of the UltraToolbarsManagers in your application so that each one is different.

Reply Children