skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class CodeBasedField

Inheritance
System.Object
Field
CodeBasedField
AuthorField
BibliographyField
CitationField
DateField
DocumentVariableField
HyperlinkField
IncludePictureField
MergeField
NotSupportedField
NumPagesField
PageField
ReferenceFieldBase
SequentialField
StyleReferenceField
SymbolField
TableOfContentsField
TCField
Inherited Members
Field.CodeFragmentFormat
Field.DisplayNameFragmentFormat
Field.GetFragmentToDisplay()
Field.GetFragmentByDisplayMode(FieldDisplayMode)
Field.SetFragmentByDisplayMode(FieldDisplayMode, DocumentFragment)
Field.CreateInstance()
Field.Update()
Field.CreateFragmentFromText(String)
Field.GetDisplayNameFragment()
Field.GetResultFragment()
Field.CreateDeepCopy()
Field.SetPropertyValue(FieldPropertyDefinition, String)
Field.SetPropertyValue(FieldPropertyDefinition, Field)
Field.IsResultFragmentEmpty()
Field.HasDisplayNameFragment
Field.FieldTypeName
Field.FieldStart
Field.DisplayMode
Field.EvaluationContext
Field.Document
Field.FieldPropertySetters
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public abstract class CodeBasedField : Field, ISupportInitialize

Constructors

CodeBasedField()

Initializes a new instance of the CodeBasedField class.

Declaration
public CodeBasedField()

Fields

DateTimeFormattingProperty

The date time formatting.

Declaration
public static readonly FieldPropertyDefinition DateTimeFormattingProperty
Field Value
FieldPropertyDefinition

GeneralFormattingProperty

The general formatting.

Declaration
public static readonly FieldPropertyDefinition GeneralFormattingProperty
Field Value
FieldPropertyDefinition

NumericFormattingProperty

The numeric formatting.

Declaration
public static readonly FieldPropertyDefinition NumericFormattingProperty
Field Value
FieldPropertyDefinition

Properties

CodeBuilder

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

Declaration
protected FieldCodeBuilder CodeBuilder { get; }
Property Value
FieldCodeBuilder

DateTimeFormatting

Declaration
[XamlSerializable]
public string DateTimeFormatting { get; set; }
Property Value
System.String

FieldCode

Gets the code of the field.

Declaration
public string FieldCode { get; }
Property Value
System.String

GeneralFormatting

Declaration
[XamlSerializable]
public string GeneralFormatting { get; set; }
Property Value
System.String

NumericFormatting

Declaration
[XamlSerializable]
public string NumericFormatting { get; set; }
Property Value
System.String

Methods

BuildCodeOverride()

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

Declaration
protected virtual void BuildCodeOverride()

CopyPropertiesFrom(Field)

Copies all properties from another field of the same type.

Declaration
public override void CopyPropertiesFrom(Field fromField)
Parameters
Field fromField

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

Overrides
Field.CopyPropertiesFrom(Field)

CopyPropertiesFrom(FieldCodeExpression)

Copies the properties of the field from a FieldCodeExpression instance.

Declaration
public void CopyPropertiesFrom(FieldCodeExpression fieldCodeExpression)
Parameters
FieldCodeExpression fieldCodeExpression

The field code expression.

CopyPropertiesFromCodeExpression(FieldCodeExpression)

Copies the field-specific properties from a FieldCodeExpression.

Declaration
protected virtual void CopyPropertiesFromCodeExpression(FieldCodeExpression fieldCodeExpression)
Parameters
FieldCodeExpression fieldCodeExpression

The field code expression.

GetCodeFragment()

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

Declaration
protected override DocumentFragment GetCodeFragment()
Returns
DocumentFragment

The code fragment

Overrides
Field.GetCodeFragment()

GetNumberResultWithFormatting(Int32)

Declaration
protected string GetNumberResultWithFormatting(int number)
Parameters
System.Int32 number

Returns
System.String

InvalidateCode()

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

Declaration
protected void InvalidateCode()

IsCodeValid()

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

Declaration
protected override bool IsCodeValid()
Returns
System.Boolean

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

Overrides
Field.IsCodeValid()

MakeHyperlinkFragment(DocumentFragment, HyperlinkInfo)

Declaration
protected DocumentFragment MakeHyperlinkFragment(DocumentFragment fragment, HyperlinkInfo hyperlinkInfo)
Parameters
DocumentFragment fragment

HyperlinkInfo hyperlinkInfo

Returns
DocumentFragment

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.