Table of Contents

Enum DocxFormIssueKind

Namespace
DocToolkit
Assembly
DocToolkit.Docx.dll

The kinds of problem a set of values can have.

public enum DocxFormIssueKind

Fields

DuplicateKey = 3

Two controls answer to the same name, so a value cannot be aimed at one of them.

InvalidBoolean = 5

The value is not usable as the check box's true/false.

InvalidChoice = 7

The value is not one of the drop-down's options.

InvalidDate = 6

The value is not usable as the date control's date.

InvalidImage = 8

The value is not usable as the picture control's image.

Reachable through this API with a file name that has no extension — the underlying library requires one.

InvalidRepeatingSection = 9

The value does not fit the control's repeating section.

MissingValue = 1

A control received no value.

Other = 0

A problem this API does not distinguish. Read Message.

UnmappedControl = 4

A control carries no name under the DocxFormKey in use.

Reachable two ways: a control with neither a tag nor an alias, and — more easily — reading a tag-only template with Alias.

UnusedValue = 2

A value was supplied for a name no control answers to.

Remarks

All nine of the underlying library's kinds are surfaced, and an earlier draft of this type surfaced three. That draft was written on a measurement which said the other six could not be provoked — and the measurement was wrong: its fixtures were hand-built SdtBlock markup, which is not a typed control, so a drop-down value outside its list really did validate clean because there was no drop-down. Against a form authored the way Word authors one, three of the six fire on the first attempt.

The lesson is recorded on DocxFormFixtures: a fixture must be authored the way the library under test authors one, or what gets measured is the fixture.