New to Telerik UI for WinFormsStart a free 30-day trial

Represents MERGEFIELD.

Definition

Constructors

Initializes a new instance of the MergeField class.

C#
public MergeField()

Fields

The field type.

C#
public static readonly string FieldType
C#
public static readonly FieldPropertyDefinition PropertyPathProperty
C#
public static readonly FieldPropertyDefinition TextAfterIfNotEmptyProperty
C#
public static readonly FieldPropertyDefinition TextBeforeIfNotEmptyProperty

Properties

Gets the name of the field type.

C#
public override string FieldTypeName { get; }

Overrides: Field.FieldTypeName

Gets the value indicating whether the field type has a display name fragment. If it doesn't, when its display mode is set to display name, the result fragment will be used instead.

C#
public override bool HasDisplayNameFragment { get; }

Overrides: Field.HasDisplayNameFragment

Gets or sets the property associated with this instance.

C#
[XamlSerializable]
public string PropertyPath { get; set; }
Property Value:

The property path/name.

Gets or sets the text after the field result, used when the latter is not empty.

C#
[XamlSerializable]
public string TextAfterIfNotEmpty { get; set; }
Property Value:

The text.

Gets or sets the text before the field result, used when the latter is not empty.

C#
[XamlSerializable]
public string TextBeforeIfNotEmpty { get; set; }
Property Value:

The text.

Methods

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

C#
protected override void BuildCodeOverride()

Overrides: CodeBasedField.BuildCodeOverride()

Converts a value to string.

C#
protected virtual string ConvertToString(object value)
Parameters:valueobject

The value.

Returns:

string

The string representation of the value.

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()

Gets the display name fragment of the field if the field has such.

C#
protected override DocumentFragment GetDisplayNameFragment()
Returns:

DocumentFragment

The display name fragment.

Overrides: Field.GetDisplayNameFragment()

Builds the result fragment of the field.

C#
protected override DocumentFragment GetResultFragment()
Returns:

DocumentFragment

The result fragment.

Overrides: Field.GetResultFragment()