Flex changes user skin values ​​at runtime

I created the main theme for my Flex application. I would like to add support for additional predefined topics. By default, the application has a theme, and I would like it to change when the user selects a theme from the drop-down list. This can be done by loading the swf file using styleManager. However, all skins have colors that are hardcoded in them. So, to achieve this, I will have to duplicate the skins and change the meaning of the colors.

Is there a better way to do this? Can I just create a skin that dynamically changes color values ​​based on user choice?

+3
source share
2 answers

- css. , .

, <SolidStoke color="0xff0000" /> <SolidStroke color="{getStyle('yourCssPropertyName')} />

+3

- , - (. [1]). , , (, , borderColor fillColor ).

, , , .

[1] - http://www.adobe.com/devnet/flex/quickstarts/skinning_components.html#host

+2

Source: https://habr.com/ru/post/1796512/


All Articles