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

Represents a field-code switch and its optional argument.

Definition

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

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class FieldSwitchNode : FieldNodeWithArgumentBase, IFieldCodeExpressionNode

Inheritance: objectFieldNodeWithArgumentBaseFieldSwitchNode

Implements: IFieldCodeExpressionNode

Inherited Members FieldNodeWithArgumentBase.FieldArgumentNode

Constructors

Creates a switch node with the specified token.

C#
public FieldSwitchNode(string switchCharacters)
Parameters:switchCharactersstring

The switch token, including its leading backslash.

Properties

Gets the switch token, including its leading backslash.

C#
public string SwitchCharacters { get; }

Methods

Gets inline elements for the switch and its optional argument.

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

IEnumerable<Inline>

The inline representation of the switch.

Overrides: FieldNodeWithArgumentBase.GetCodeExpressionFragment()

Gets the switch token followed by its serialized argument, if one is present.

C#
public override string GetCodeExpressionString()
Returns:

string

The switch and optional argument as field-code text.

Overrides: FieldNodeWithArgumentBase.GetCodeExpressionString()