VisioShapeDataSchema
OfficeIMO.Visio
Reusable Shape Data schema for applying consistent Visio Prop rows to shapes and connectors.
Inheritance
- object
- VisioShapeDataSchema
Usage
Explore 5 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Method VisioShapeDataSchema.Add
- Method VisioShapeDataSchema.Create
- Method VisioShapeDataSchema.Field
Accepted by parameters 2
Constructors
public VisioShapeDataSchema() #Methods
public VisioShapeDataSchema Add(VisioShapeDataField field) #Adds a preconfigured field to the schema.
Parameters
- field OfficeIMO.Visio.VisioShapeDataField
- Field to add.
Returns
VisioShapeDataSchemapublic VisioShape ApplyTo(VisioShape shape, bool overwriteValues = false) #Applies the schema to a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to update.
- overwriteValues bool = false
- Whether schema defaults should replace existing values.
Returns
VisioShapepublic VisioConnector ApplyTo(VisioConnector connector, bool overwriteValues = false) #Applies the schema to a connector.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to update.
- overwriteValues bool = false
- Whether schema defaults should replace existing values.
Returns
VisioConnectorpublic IReadOnlyList<VisioShape> ApplyTo(IEnumerable<VisioShape> shapes, bool overwriteValues = false) #Applies the schema to a set of shapes.
Parameters
- shapes System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioShape>
- Shapes to update.
- overwriteValues bool = false
- Whether schema defaults should replace existing values.
Returns
IReadOnlyList<VisioShape>public IReadOnlyList<VisioConnector> ApplyToConnectors(IEnumerable<VisioConnector> connectors, bool overwriteValues = false) #Applies the schema to a set of connectors.
Parameters
- connectors System.Collections.Generic.IEnumerable<OfficeIMO.Visio.VisioConnector>
- Connectors to update.
- overwriteValues bool = false
- Whether schema defaults should replace existing values.
Returns
IReadOnlyList<VisioConnector>public static VisioShapeDataSchema Create() #Creates an empty Shape Data schema.
Returns
VisioShapeDataSchemapublic VisioShapeDataSchema Field(string name, string? label = null, VisioShapeDataType? type = null, string? defaultValue = null, string? prompt = null, string? format = null, string? sortKey = null, bool required = false, bool? invisible = null, bool? verify = null, bool? dataLinked = null, IEnumerable<string>? allowedValues = null) #Adds a field to the schema.
Parameters
- name string
- Shape Data row name.
- label string? = null
- Optional label shown in Visio's Shape Data window.
- type OfficeIMO.Visio.VisioShapeDataType? = null
- Optional Shape Data type.
- defaultValue string? = null
- Default value used when applying the schema to missing or overwritten fields.
- prompt string? = null
- Optional help prompt.
- format string? = null
- Optional format picture or list values.
- sortKey string? = null
- Optional sort key used by Visio's Shape Data window.
- required bool = false
- Whether validation should require a non-empty value.
- invisible bool? = null
- Whether the row is hidden in Visio's Shape Data window.
- verify bool? = null
- Whether Visio should ask for the value when the shape is created, copied, or duplicated.
- dataLinked bool? = null
- Whether this row is linked to an external data recordset.
- allowedValues System.Collections.Generic.IEnumerable<string>? = null
- Optional allowed value list used by validation and list formats.
Returns
VisioShapeDataSchemapublic IReadOnlyList<VisioShapeDataSchemaIssue> Validate(VisioShape shape) #Validates a shape against the schema.
Parameters
- shape OfficeIMO.Visio.VisioShape
- Shape to validate.
Returns
IReadOnlyList<VisioShapeDataSchemaIssue>public IReadOnlyList<VisioShapeDataSchemaIssue> Validate(VisioConnector connector) #Validates a connector against the schema.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to validate.
Returns
IReadOnlyList<VisioShapeDataSchemaIssue>Inherited Methods
Properties
public IReadOnlyList<VisioShapeDataField> Fields { get; } #Fields included in the schema.