User Guide
88 Creating Simple MXML Components
You can also use a type selector to define styles. A type selector applies styles to all instances of
a component, as the following example shows:
<?xml version="1.0"?>
<!-- mxml/MainStyleOverrideUsingTypeSel.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:MyComp="myComponents.*">
<mx:Style>
StateComboBoxWithStyleProps {
openDuration : 1000;
}
</mx:Style>
<MyComp:StateComboBoxWithStyleProps/>
</mx:Application>
In this example, the type selector specifies the openDuration style for all instances of the
StateComboBox control in the application. When you specify any styles by using a type
selector, those styles override all styles that you set by using a class selector in the MXML file.
Those styles do not override styles that you set by using tag properties in the MXML file.