Export (0) Print
Expand All

4 Xaml Type Order

Xaml types in this specification are ordered in a hierarchical way. The WPF Xaml Vocabulary uses the [types assignable to] property in a way that corresponds to inheritance in object-oriented programming. ‘Base’ types are presented before ‘derived’ types. (That is, most types are defined before appearing in the [types assignable to] lists of other types.)

The number that appears to the left of the first row of each XamlType Information Item indicates its position in the inheritance hierarchy of the types. The following example shows the XamlType Information Items for the Fruit, Apple, and Banana types. The numbers indicate that the Apple and Banana types derive from Fruit.

4.5 Fruit

(usage)

Value

property N

Value

4.5.1 Apple

(usage)

Value

property N

Value

4.5.2 Banana

(usage)

Value

property N

Value

Since this specification models typical object-oriented inheritance, a ‘derived’ type inherits all members from a ‘base’ type. This is not made explicit. For each type, only additional members are listed. The MS-XAML specification does not require this inheritance-like style. In the Xaml Schema Information Set data model, each type lists its members exhaustively. Therefore, the correct interpretation of a type definition in this specification is that the corresponding XamlType Information Item’s [members] property should include not just the listed members, but also all of the [members] of each type listed in its [types assignable to] property.

XamlMember Information Items have numerous properties, and in this specification, members are more similar than they are different. So a notation is used to minimize redundancy. Some XamlMember Information Item properties may be omitted. Unless specified otherwise, the default values described in the following table apply.

Property

Default Value

[ text syntax]

Null

[ is read only]

False

[ is static]

False

[ is attachable]

False

[ target type]

Null

[ allowed location]

Any

[ is event]

False

[ is directive]

False

Members are not defined in distinct sections of this specification – they are listed inside their defining type following a row named (properties). This means that the [owner type] member defined by MS-XAML is never specified explicitly in this specification. The [owner type] is always the type in which the member definition appears. Likewise, the [members] property of the defining type is never explicitly defined – it always contains all of the members listed for that type. The [name] and [value type] are specified on the first line of the property description. This line may be followed by non-default values for other properties. The following example shows the XamlType Information Item for the Satsuma type, which defines a member named SegmentCount of type Int32.

4.5.9 Satsuma

(usage)

<Satsuma />

(description)

Specifies a small, orange citrus fruit.

[types assignable to]

Satsuma Fruit Object

(properties)

SegmentCount

Int32

(description)

The number of segments in this satsuma.

If all of the XamlMember Information Item properties had been listed in full for this property, it would look like the following table.

Property

Value

[ name ]

SegmentCount

[ owner type]

Satsuma

[ value type]

Int32

[ text syntax]

Null

[ is read only]

False

[ is static]

False

[ is attachable]

False

[ target type]

Null

[ allowed location]

Any

[ is event]

False

As with the type-level (description), the per-member (description) entries in this specification are non-normative.

XamlType Information Item descriptions in this document may contain up to three additional member categories: attachable members, event members, and static members. These three member categories have slightly different defaults, and are grouped separately in the type definitions for clarity. The conventions for these member categories are defined in the following sections.

Show:
© 2016 Microsoft