Class Field
Inheritance
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Documents.dll
Syntax
public abstract class Field : Object, ISupportInitialize
Constructors
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 |
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()