• 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 ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    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 UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Field

Inheritance
System.Object
Field
CodeBasedField
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Documents.dll

Syntax

public abstract class Field : ISupportInitialize

Constructors

Field()

Initializes a new instance of the Field class.

Declaration
public Field()

Fields

CodeFragmentFormat

Declaration
protected static readonly string CodeFragmentFormat
Field Value
System.String

DisplayNameFragmentFormat

Declaration
protected static readonly string DisplayNameFragmentFormat
Field Value
System.String

Properties

DisplayMode

Gets or sets the current display mode of the field.

Declaration
[XamlSerializable]
public FieldDisplayMode DisplayMode { get; set; }
Property Value
FieldDisplayMode

Document

Gets the document associated with the field.

Declaration
public RadDocument Document { get; }
Property Value
RadDocument

EvaluationContext

Gets the evaluation context of a field.

Declaration
public EvaluationContext EvaluationContext { get; }
Property Value
EvaluationContext

The evaluation context.

FieldPropertySetters

Declaration
[XamlCompositePropertySerializable]
public List<FieldPropertySetter> FieldPropertySetters { get; set; }
Property Value
System.Collections.Generic.List<FieldPropertySetter>

FieldStart

Gets the FieldRangeStart instance associated with this field.

Declaration
public FieldRangeStart FieldStart { get; }
Property Value
FieldRangeStart

FieldTypeName

Gets the name of the field type.

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

HasDisplayNameFragment

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.

Declaration
public virtual bool HasDisplayNameFragment { get; }
Property Value
System.Boolean

Methods

CopyPropertiesFrom(Field)

Copies all properties from another field of the same type.

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

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

CreateDeepCopy()

Creates a deep copy of the field.

Declaration
public Field CreateDeepCopy()
Returns
Field

The copy of the field.

CreateFragmentFromText(String)

Creates a document fragment from a string. The style properties of the elements in the fragment are based on the style properties of the FieldRangeStart and the parent paragraph.

Declaration
protected DocumentFragment CreateFragmentFromText(string text)
Parameters
System.String text

The text to create a fragment from.

Returns
DocumentFragment

The document fragment.

CreateInstance()

Creates a new instance of the current field class.

Declaration
public abstract Field CreateInstance()
Returns
Field

The new field instance.

GetCodeFragment()

Gets the code fragment of the field.

Declaration
protected abstract DocumentFragment GetCodeFragment()
Returns
DocumentFragment

The code fragment.

GetDisplayNameFragment()

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

Declaration
protected virtual DocumentFragment GetDisplayNameFragment()
Returns
DocumentFragment

The display name fragment.

GetFragmentByDisplayMode(FieldDisplayMode)

Gets a fragment of the field corresponding to mode.

Declaration
public DocumentFragment GetFragmentByDisplayMode(FieldDisplayMode mode)
Parameters
FieldDisplayMode mode

The display mode.

Returns
DocumentFragment

The fragment corresponding to the display mode.

GetFragmentToDisplay()

Gets one of the fragments of the field on the basis of DisplayMode.

Declaration
public DocumentFragment GetFragmentToDisplay()
Returns
DocumentFragment

The fragment.

GetResultFragment()

Builds the result fragment of the field.

Declaration
protected abstract DocumentFragment GetResultFragment()
Returns
DocumentFragment

The result fragment.

IsCodeValid()

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

Declaration
protected abstract bool IsCodeValid()
Returns
System.Boolean

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

IsResultFragmentEmpty()

Declaration
protected bool IsResultFragmentEmpty()
Returns
System.Boolean

SetFragmentByDisplayMode(FieldDisplayMode, DocumentFragment)

Sets the fragment of the field corresponding to mode.

Declaration
public void SetFragmentByDisplayMode(FieldDisplayMode mode, DocumentFragment fragment)
Parameters
FieldDisplayMode mode

The display mode.

DocumentFragment fragment

The fragment to be set corresponding to the mode.

SetPropertyValue(FieldPropertyDefinition, String)

Declaration
public void SetPropertyValue(FieldPropertyDefinition propertyDefinition, string value)
Parameters
FieldPropertyDefinition propertyDefinition

System.String value

SetPropertyValue(FieldPropertyDefinition, Field)

Declaration
public void SetPropertyValue(FieldPropertyDefinition propertyDefinition, Field nestedField)
Parameters
FieldPropertyDefinition propertyDefinition

Field nestedField

Update()

Updates the field. Updates all nested fields and rebuilds the fragments.

Declaration
public void Update()

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
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.