[Andrew Trice] Using mx:Metadata to Define Component Styles

I’m sure that you already know that you can create custom components in Flex. I’m also sure that you know that you can use CSS to style your applications and components. Did you know that you can also use styles of your custom component to define styles on elements within that custom component?

Ok, I may have lost some of you there. Lets take a look at my example below… What I am showing here are 2 custom components side by side (example 1 and example 2). They are two separate instances of my “MXML_Example” component. Yes, they look different, but they are the exact same component. Each “MXML_Example” component contains a mx:Panel, mx:TextArea, and mx:Button.

[


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: