Content Controls (Structured Document Tags)

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.

Content controls inside the document

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:

  • Bibliography
  • CheckBox
  • Citation
  • ComboBox
  • Date
  • DocumentPart
  • DocumentPartGallery
  • DropDownList
  • Equation
  • Group
  • Picture
  • RichText
  • Text
  • PlaceHolder
  • RepeatingSection
  • RepeatingSectionItem

The following content controls are not supported by Microsoft Word:

  • Bibliography
  • Equation

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.

Content controls that have specific properties.

CheckBox

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.

ComboBox and DropDownList

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.

Date

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.

See Also

In this article
Not finding the help you need? Improve this article