Custom attribute to control specific aspects of GraphML deserialization.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graphml.GraphMLAttribute
See Also
Properties
Specifies the property of a class that is used as the content property in XAML.
Remarks
The value of the content property can appear in XAML as a direct child of the class element, without the need to wrap it into a <Class.Property>
element.
This property is ignored if the attribute targets a member declaration.
Gets or sets the default value of the property this attribute is bound to.
Remarks
See Also
Gets or sets a custom IMarkupExtensionConverter for attribute serialization.
Remarks
See Also
Types that should be searched for static field or property members of the annotated type.
Remarks
Examples
Using the following annotation
const ContainedType = BaseClass('ContainedType', {
$meta() {
return [
GraphMLAttribute().init({
singletonContainers: [PoolHeaderLabelModelExtension.$class]
})
]
},
constructor: function () {}
})
const ContainingType = BaseClass('ContainingType', {
$static: {
INSTANCE: {
$meta() {
return [TypeAttribute(ContainedType.$class)]
},
value: new ContainedType()
}
}
})
// @ts-ignore
const ContainedType = BaseClass('ContainedType', {
$meta(): any[] {
return [
GraphMLAttribute().init({
singletonContainers: [PoolHeaderLabelModelExtension.$class]
})
]
},
constructor: function (): void {}
})
// @ts-ignore
const ContainingType = BaseClass('ContainingType', {
$static: {
INSTANCE: {
$meta(): any[] {
return [TypeAttribute(ContainedType.$class)]
},
value: new ContainedType()
}
}
})
has the effect that all references to field ContainedTypeSingleton
will be written as static extensions, e.g.
{x:Static myNSDeclarationPrefix:ContainingType.ContainedTypeSingleton}
Gets or sets the type of the valueSerializer implementation.
Gets or sets how a member should be visible to GraphML.
Remarks
Default value is VISIBLE.
This property is ignored if the attribute targets a type declaration.
Gets or sets whether the member should be written as an XML element or as an XML attribute.
Remarks
Default value is AUTO.
This property is ignored if the attribute targets a type declaration.
See Also
Gets or sets whether an enclosing tag for the property itself is written.
Remarks
If true
, the resulting XML will look like
<ParentObjectName.Name>
<PropertyTypeName>
content
</PropertyTypeName>
</ParentObjectName.Name>
Default value is true
.
This property is ignored if the attribute targets a type declaration.