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
485
How do I use the StyleResourceName?
posted

Hello, I'm new with the App Stylist, but I do have my test app working with a default style sheet.

My question is that while my basic UltraButton is assigned a specific style which works throughout the application, I have some UltraButtons that I want to style differently. How do I do this?

I really would of thought that I could just plug a reference name into a property of the control which would then allow that control to show up as my named control in my style controller so I could set it's properties, but I guess it's not that simple.

After reading some post I have tried to use the StyleResourceName, but apparently I don't understand quite how to make that work. I did create a resouce in my style library or sheet (not really sure the difference) and I named it the same as that entered in the StyleResouceName of the control. All the other Appearance properties are set to default. It does not pick up the style of the resource and just picks up the default from the style sheet.

Is there somethng I'm not doing? I do have the "UseAppStyling" on the control set to "True".

Any help would be greatly appreciated.

Parents
  • 469350
    Verified Answer
    Offline posted

    Okay... the StyleResourceName basically tells the control to use the resource information instead of the actual properties applied to that Appearance.

    But... the control won't even look at it's own Appearance property by default when an Application Style Library is loaded, because the isl takes precedence. So StyleResourceName is only really useful for cases where you are applying an appearance to an individual object whose appearance overrides Application Styling, such as a single cell in a grid. It won't do much good for an entire button control like you have here.

    What you can do is open up your isl file and add a new StyleSet and style the Button control for that StyleSet. Then you set the StyleSetNane property of the button to point the button to the new StyleSet you added. This tells the button to use the StyleSet you specified, instead of the default StyleSet that every other button is using.

Reply Children
No Data