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

Represents a builder for constructing field code expressions in Telerik document models.

Definition

Namespace:Telerik.Windows.Documents.Model.Fields.CodeExpressions

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public class FieldCodeBuilder

Inheritance: objectFieldCodeBuilder

Constructors

C#
public FieldCodeBuilder(string fieldType)
Parameters:fieldTypestring

Methods

Adds a switch statement to the field code builder with the specified case expression and field property.

C#
public void AddSwitch(string switchCharacters, FieldProperty prop)
Parameters:switchCharactersstring

The field property associated with the switch statement.

propFieldProperty

The case expression as a string that will be used in the switch statement.

Adds a switch statement to the field code builder using the specified expression.

C#
public void AddSwitch(string switchCharacters)
Parameters:switchCharactersstring

The expression that defines the switch statement.

Retrieves the code expression fragment associated with the field code builder.

C#
public IEnumerable<Inline> GetCodeExpressionFragment()
Returns:

IEnumerable<Inline>

A string representing the code expression fragment.

Gets the result code generated by the field code builder.

C#
public string GetResultCode()
Returns:

string

The generated result code as a string.

Rebuilds a field code from the specified input string.

C#
public void RebuildFromCode(string fieldCode)
Parameters:fieldCodestring

The input string that represents the field code to be rebuilt.

Resets the state of the FieldCodeBuilder, clearing any existing code expressions.

C#
public void Reset()

Sets the argument for a field in the document model.

C#
public void SetFieldArgument(FieldProperty prop)
Parameters:propFieldProperty

The field property to be set as an argument for the field.