New to Telerik UI for WinForms? Start a free 30-day trial

Resolves a named document variable and displays its value as the field result.

Definition

Constructors

Creates a document-variable field with its variable-name property initialized.

C#
public DocumentVariableField()

Fields

Identifies the field-code token for document-variable fields.

C#
public static readonly string FieldType

Identifies the field-code property that stores the variable name.

C#
public static readonly FieldPropertyDefinition VariableNameProperty

Properties

Gets the name of the field type.

C#
public override string FieldTypeName { get; }

Overrides: Field.FieldTypeName

Gets or sets the name used to look up a value in the document's variable collection.

C#
[XamlSerializable]
public string VariableName { get; set; }

Methods

Builds the field-specific parts of the code fragment, using the current CodeBuilder.

C#
protected override void BuildCodeOverride()

Overrides: CodeBasedField.BuildCodeOverride()

Converts a variable value to text for document export.

C#
public static string ConvertValueToString(object value)
Parameters:valueobject

The value to convert.

Returns:

string

An empty string when value is null; otherwise, its ToString() result.

Copies all properties from another field of the same type.

C#
public override void CopyPropertiesFrom(Field fromField)
Parameters:fromFieldField

The other field, which has to be of the same type as the current instance.

Overrides: CodeBasedField.CopyPropertiesFrom(Field)

Copies the field-specific properties from a FieldCodeExpression.

C#
protected override void CopyPropertiesFromCodeExpression(FieldCodeExpression fieldCodeExpression)
Parameters:fieldCodeExpressionFieldCodeExpression

The field code expression.

Overrides: CodeBasedField.CopyPropertiesFromCodeExpression(FieldCodeExpression)

Creates a new instance of the current field class.

C#
public override Field CreateInstance()
Returns:

Field

The new field instance.

Overrides: Field.CreateInstance()

Builds the result fragment of the field.

C#
protected override DocumentFragment GetResultFragment()
Returns:

DocumentFragment

The result fragment.

Overrides: Field.GetResultFragment()