锁定老帖子 主题:Flex 自定义Style属性
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-09-06
最后修改:2009-09-06
Metadata Tags in Custom Components
Metadata statements are associated with a class declaration, an individual data field, or a method. They are bound to
Metadata tags in ActionScript
Style Metadata
name String (Required)
Specifies the name of the style.
type String
Specifies the data type of the value that you write to the style property. If the type is
arrayType String
If type is Array, arrayType specifies the data type of the Array elements. If the data
format String
Specifies the units of the property. For example, if you specify type as "Number" ,
enumeration String
Specifies an enumerated list of possible values for the style property.
inherit String
Specifies whether the property is inheriting. Valid values are yes and no. This property refers to CSS inheritance, not object-oriented inheritance. All subclasses automatically use object-oriented inheritance to inherit the style property definitions of their superclasses. Some style properties are inherited using CSS inheritance. If you set an inheritable style property on a parent container, its children inherit that style property. For example, if you define fontFamily as Times for a Panel container, all children of that container will also use Times for fontFamily, unless they override that property. If you set a noninheritable style, such as textDecoration, on a parent container, only the parent container and not its children use that style. For more information on inheritable style properties, see About style inheritance.
states String
For skin properties, specifies that you can use the style to specify a stateful skin for multiple states of the component. For example, the definition of the Slider.thumbSkin style uses the following [Style] metadata tag: [Style(name="thumbSkin", type="Class", inherit="no", states="disabled, down, over, up")]This line specifies that you can use the Slider.thumbSkin style to specify a stateful skin for the disabled, down, over, and up states of the Slider control. For more information, see Creating Halo Skins.
theme String
If the style is only valid for a specific theme, specifies the name of the theme. For example, some styles on Flex components are only valid if you are using the Spark or Halo theme. For more information, see About themes
Demo: 1· ColourComponent Class 2· App.mxml More Info Plaease See 为自定义Flex Component定义Style
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
浏览 4106 次