共用方式為


StyleSheet Element

Represents a style defined in a document.

Syntax

<StyleSheet
    ID
    [Name]
    [NameU]
    [LineStyle]
    [FillStyle]
    [TextStyle]>
</StyleSheet>

Attributes

ID

Required int. The unique ID of the element within its parent element.

Name

Optional string. The name of the element.

NameU

Optional string. The universal name of the element.

LineStyle

Optional int. The ID of the StyleSheet element from which this style inherits line formatting.

FillStyle

Optional int. The ID of the StyleSheet element from which this style inherits fill formatting.

TextStyle

Optional int. The ID of the StyleSheet element from which this style inherits text formatting.

Element properties

Property

Value

Name

StyleSheet

Minimum Occurrences

0

Maximum Occurrences

Unbounded

Element information

Parent elements

StyleSheets

Child elements

Text

XForm

Line

Fill

XForm1D

Event

LayerMem

StyleProp

Foreign

PageProps

TextBlock

TextXForm

Align

Protection

Help

Misc

RulerGrid

DocProps

Image

Group

Layout

PageLayout

PrintProps

Char

Para

Tabs

Scratch

Connection

ConnectionABCD

Field

Control

Geom

Act

Layer

User

Prop

Hyperlink

Reviewer

Annotation

SmartTagDef

Data1

Data2

Data3

ForeignData

Any shape to which a style is applied inherits the attributes defined for the style. The LineStyle , FillStyle , and TextStyle attributes of a Shape element apply styles to a shape.

While the elements listed above are all valid children of the StyleSheet element, in practice only the following elements are relevant: Char , Event , Fill , Group , Help , Image , LayerMem , Layout , Line , Misc , PageLayout , Para , Protection , RulerGrid , StyleProp , Tabs , and Textblock .

StyleSheet elements can inherit from other StyleSheet elements; however, circular references are not allowed.

See also

Styles property