Flex中如何通过设定headerStyleName样式在Accordion控件中使用嵌入字体的例子

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
        layout="vertical" 
        verticalAlign="middle" 
        backgroundColor="white"> 
  
    <mx:Style> 
        @font-face { 
            src: local("Base 02"); 
            fontFamily: EmbeddedBase02; 
        } 
  
        Accordion { 
            headerStyleName: accordionHeaderStyleName; 
        } 
  
        .accordionHeaderStyleName { 
            fontFamily: EmbeddedBase02; 
            fontWeight: normal; 
        } 
    </mx:Style> 
  
    <mx:Accordion id="accordion" 
            creationPolicy="all" 
            width="100%" 
            height="100%"> 
        <mx:VBox label="Red" 
                backgroundColor="red" 
                width="100%" 
                height="100%"> 
        </mx:VBox> 
        <mx:VBox label="Orange" 
                backgroundColor="haloOrange" 
                width="100%" 
                height="100%"> 
        </mx:VBox> 
        <mx:VBox label="Yellow" 
                backgroundColor="yellow" 
                width="100%" 
                height="100%"> 
        </mx:VBox> 
        <mx:VBox label="Green" 
                backgroundColor="haloGreen" 
                width="100%" 
                height="100%"> 
        </mx:VBox> 
        <mx:VBox label="Blue" 
                backgroundColor="haloBlue" 
                width="100%" 
                height="100%"> 
        </mx:VBox> 
    </mx:Accordion> 
  
</mx:Application>

你可能感兴趣的:(xml,Flex)