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

Definition

Constructors

Initializes a new instance of the CodeBasedField class.

C#
public CodeBasedField()

Fields

The date time formatting.

C#
public static readonly FieldPropertyDefinition DateTimeFormattingProperty

The general formatting.

C#
public static readonly FieldPropertyDefinition GeneralFormattingProperty

The numeric formatting.

C#
public static readonly FieldPropertyDefinition NumericFormattingProperty

Properties

Gets the FieldCodeBuilder used to create the code fragment of the field.

C#
protected FieldCodeBuilder CodeBuilder { get; }
C#
[XamlSerializable]
public string DateTimeFormatting { get; set; }

Gets the code of the field.

C#
public string FieldCode { get; }
C#
[XamlSerializable]
public string GeneralFormatting { get; set; }
C#
[XamlSerializable]
public string NumericFormatting { get; set; }

Methods

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

C#
protected virtual void BuildCodeOverride()

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: Field.CopyPropertiesFrom(Field)

Copies the properties of the field from a FieldCodeExpression instance.

C#
public void CopyPropertiesFrom(FieldCodeExpression fieldCodeExpression)
Parameters:fieldCodeExpressionFieldCodeExpression

The field code expression.

Copies the field-specific properties from a FieldCodeExpression.

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

The field code expression.

Gets the code fragment of the field. If the code is currently not valid, it will be rebuilt.

C#
protected override DocumentFragment GetCodeFragment()
Returns:

DocumentFragment

The code fragment

Overrides: Field.GetCodeFragment()

C#
protected string GetNumberResultWithFormatting(int number)
Parameters:numberintReturns:

string

Invalidates the code fragment of the field. The next time the code fragment is requested, it will be built anew.

C#
protected void InvalidateCode()

Gets the value indicating whether the code in the code fragment is currently valid.

C#
protected override bool IsCodeValid()
Returns:

bool

The value indicating whether the code in the code fragment is currently valid.

Overrides: Field.IsCodeValid()

C#
protected DocumentFragment MakeHyperlinkFragment(DocumentFragment fragment, HyperlinkInfo hyperlinkInfo)
Parameters:fragmentDocumentFragmenthyperlinkInfoHyperlinkInfoReturns:

DocumentFragment