The serialization type to use with form fields.
[SerializableAttribute()]
public enum FormFieldSerializationTagType
Value | Member | Description |
---|---|---|
0 | String | Serialize the form field as a string. Using this mode ensures that the forms data files can be used by both the .NET framework and .NET standard version of LEADTOOLS. |
1 | Binary | Use binary serialization. Using this mode will prevent forms data files created by the .NET framework version of LEADTOOLS from being used by the .NET standard version. This value is not supported and will throw an exception when used through the .NET standard version of LEADTOOLS. |
FormFieldSerializationTagType is the type used by the FormField.SerializationTagType static property that controls the serialization mode used by the forms toolkit when saving FormField objects to disk. This process is performed during the creation of master forms phase in the application.
For the .NET standard version of LEADTOOLS, the default value of FormField.SerializationTagType is FormFieldSerializationTagType.String
. This ensures that all FormField objects will be serialized as simple string types and data files created by the toolkit can be used by the .NET framework version of LEADTOOLS as well.
For the .NET framework version of LEADTOOLS, the default value of FormField.SerializationTagType is FormFieldSerializationTagType.Binary
for backward compatibility. If this value is not changed, then FormField objects will be serialized using the .NET framework native binary serializer and is not compatible with the .NET standard version of LEADTOOLS.
The master form editor application included in your LEADTOOLS installation will automatically upgrade the master forms to use FormFieldSerializationTagType.String
. Simply load and then re-save the master form sets.
Therefore, master forms saved using FormFieldSerializationTagType.String
can be created and consumed by both .NET framework and .NET standard version of LEADTOOLS. However, master forms saved using FormFieldSerializationTagType.Binary
can only be created and consumed by the .NET framework version of LEADTOOLS only.
Changing the default value of FormField.SerializationTagType depends on the nature of the application as follows:
.NET framework only: If the master form files are shared between applications using v19 and v20 of LEADTOOLS, then it is recommended to leave the value as FormFieldSerializationTagType.Binary
for backward compatibility.
.NET framework only: If new master form files are created by the applications using v20 of LEADTOOLS, then it is recommended to set the value to FormFieldSerializationTagType.String
to ensure that the data files can be used in the future by the .NET standard version of LEADTOOLS if needed.
.NET standard only: FormFieldSerializationTagType.String
is the only mode supported.
Mixed .NET framework and standard: If the application contains parts using .NET framework and parts using .NET standard: For instance, the master forms editor is a .NET framework application using WPF and the forms are consumed by a .NET standard web service. Then the value of must be set to FormFieldSerializationTagType.String
to ensure that the data files can be used by both applications.