Structured Document Tags (sdt) enable users to add specific semantics to a part of the document: restricting input, binding to data source, modifying editing behavior etc.
Currently, RadRichTextEditor only visualize the value of the content controls and there is no UI that allow you to interact with them. The import and export operations will work with Office Open XML (docx) and XAML formats. When exporting to other formats the content controls will be lost.
The contented controls can be defined on Block, Inline, Row or Cell level. The content controls can contain other content controls as well.
Currently, the supported content controls are:
The following content controls are not supported by Microsoft Word:
The above content controls share the following properties:
- Type: the type of the current content control.
- ID: each content control must have an unique ID.
- DataBinding: Gets or sets an XML mapping (DataBinding) that relates the content of associated SDT to a specific XML node.
Lock: This property controls if the entire content control or its contents can be edited or deleted. The possible values are:
- Unlocked: the content control can be edited and deleted.
- SdtLocked: the content control can be edited but cannot be deleted.
- ContentLocked: the content control cannot be edited, the entire content control can be deleted.
- SdtContentLocked: the content control cannot be edited or deleted.
- Alias: Gets or sets the name for the associated content control.
- OutlineColor: Gets or sets the color that is used for visualizing the outline.
OutlineAppearance Represents the different options for visualizing the outline of a content control.The possible values are:
- BoundingBoxes: The content is wrapped in a bounding box that may also contain a specific editor.
- Tags: The content is wrapped in design view tag.
- None: The content does not have outline visualization.
The CheckBox content control exposes two properties CheckedState and UnCheckedState, both properties are of type SdtCheckBoxState which allows you to set the respective character and its font. The Checked property specifies whether the checkbox is checked.
The ComboBox and DropDownList provider the user with options to choose from.The only difference is that when using ComboBox you can add a value that is not in the data source.
- Items: This property allows you to specify the predefined items.
- LastValue: This property return the currently selected value.
The Date content control allows you to enter a date by using a calendar. The dataContent control has the following properties:
- DateFormat: Allows you to get/set the format string of the date. If it is omitted the default date format for the language is used.
- LanguageId: Allows you to get/set the CultureInfo object for the date format.
- DateTime: The current selected data, stored as string.
Calendar: Allows you to select the calendar type.