[]
An individual content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as dates, lists, or paragraphs of formatted text.
public class ContentControl : ContentObject, IBrowsable<ContentControl>
Gets or sets whether to allow the insertion of new or deletion of old content control with type RepeatingSectionItem contained within this content control except when needed to maintain the numerical relation between the number of elements matched through data binding and the number of child content controls contained. This property has effect only for content controls with type RepeatingSection.
public bool AllowInsertDeleteSection { get; set; }
Gets or sets the appearance of the content control.
public ContentControlAppearance Appearance { get; set; }
Gets or sets the category of building blocks which shall be used as the filter when determining the possible choices of building blocks which are displayed for insertion into the content control. A building block category is a sub-classification within a given building block gallery which can be used to further categorize the parts in a given gallery. If value is null, then the content control shall display all building blocks in the specified gallery regardless their specified category. This property has effect for content controls with type BuildingBlockGallery and BuildingBlock.
public string BuildingBlockCategory { get; set; }
Gets or sets the gallery of building blocks which shall be used as the filter when determining the possible choices of building blocks which are displayed for insertion into the content control. A building block gallery is a classification of building blocks, which might then be subdivided into categories. This property has effect for content controls with types BuildingBlockGallery and BuildingBlock.
public string BuildingBlockGallery { get; set; }
Gets or sets that this content control is being used to encapsulate a built-in content control. This property has effect for content controls with type BuildingBlockGallery and BuildingBlock.
public bool BuiltInBuildingBlock { get; set; }
Gets or sets whether the checkbox is checked. This property has effect only for content controls with type CheckBox.
public bool Checked { get; set; }
Gets the symbol the symbol used to represent the checked state of the checkbox. This property has effect only for content controls with type CheckBox.
public CheckBoxSymbol CheckedState { get; }
Gets the color on which to base the visual elements of the content control.
public WordColor Color { get; }
Gets the last known contents of the control. This contents shall be treated as a cache of the contents to be displayed in the control.
public ControlContent Content { get; }
Gets the type for a content control.
public ContentControlType ControlType { get; }
Gets or sets the date last entered into the content control. This cache is used because the date display mask stored on the DateFormat property might not contain all of the information about the date, which might be needed if the date display mask is later changed. If this property is not null, then the current value shall be used to populate the content of the content control by filtering it through the date display mask specified in the DateFormat property, if it's not null. This property has effect only for content controls with type Date.
public DateTime? Date { get; set; }
Gets or sets the calendar which shall be displayed for the current date picker content control, if a user interface is present for the content control. This property has effect only for content controls with type Date.
public CalendarType DateCalendar { get; set; }
Gets or sets the display format which shall be used to format any date from the Date before displaying it in the control content. If this property is null, then the date shall be formatted using the standard date display mask for the language ID specified in the DateLocale property if present, or the language ID of the run contents otherwise. This property has effect only for content controls with type Date.
public string DateFormat { get; set; }
Gets or sets the language ID which shall be used for displaying a calendar for the current date picker content control, if a user interface is present for the content control. If this property is null, then the language ID shall be the language ID of the run contents of the content control. This property has effect only for content controls with type Date.
public string DateLocale { get; set; }
Gets or sets the translation which shall be performed on the displayed date in a date picker content control when the current contents are saved into the associated custom XML data via the XmlMapping property. This property has effect only for content controls with type Date.
public DateStorageFormat DateStorageFormat { get; set; }
Gets the DropDownItemCollection to display in content control if its type is ComboBox or DropdownList.
public DropDownItemCollection DropDownItems { get; }
Gets the formatting which shall be applied to the mark present to delimit the end of the control contents.
public ContentControlEndMark EndMark { get; }
Gets the font which shall be applied to the text of the content control in replacement of placeholder text. When placeholder text is present in a content control, its formatting is often different than the desired underlying formatting, and this property specifies the font which shall be used for non-placeholder text contents when they are initially added to the control.
public Font Font { get; }
Gets or sets a unique numerical ID for the content control.
public int Id { get; set; }
Gets the content control layout level.
public ContentControlLevel Level { get; }
Gets or sets whether the contents of the content control can be edited at runtime.
public bool LockContents { get; set; }
Gets or sets whether the content control can be deleted. If true, then the Temporary property will be reset to false.
public bool LockControl { get; set; }
Gets or sets whether soft line breaks can be added to the contents of this control when this document is modified. This property shall not affect the ability of the control to display existing soft line breaks (which shall be preserved) and shall only affect the ability to add line breaks when the document is modified by an application. This property has effect only if the property ControlType is Text or ExternalContentEntityPicker.
public bool MultiLine { get; set; }
Gets the next content control in a collection.
public ContentControl Next { get; }
Gets the parent content control.
public ContentControl ParentControl { get; }
Gets or sets the building block which shall be displayed in the content control when its run contents are empty. If this property is null, then five non-breaking spaces shall be used as the default placeholder text. This property has no effect if the property ControlType is RepeatingSection.
public BuildingBlock PlaceholderText { get; set; }
Gets the previous content control in a collection.
public ContentControl Previous { get; }
Gets or sets the display name of the repeated section. This property has effect only for content controls with type RepeatingSection.
public string RepeatingSectionItemTitle { get; set; }
Gets or sets whether the content of the control shall be interpreted to contain placeholder text for this content control (as opposed to regular text contents within the content control). If this property is true, this state shall be resumed (showing placeholder text) upon opening this document. If this property is false, then the content control shall not be interpreted to be showing placeholder text when the document is displayed. This property has no effect if the property ControlType is RepeatingSection.
public bool ShowingPlaceholderText { get; set; }
Gets or sets a character or linked paragraph style which shall be applied to the text of the content control in replacement of placeholder text. When placeholder text is present in a content control, its formatting is often different than the desired underlying formatting, and this property specifies the style which shall be used for non-placeholder text contents when they are initially added to the control.
public Style Style { get; set; }
Gets or sets a programmatic tag associated with the content control. A programmatic tag is an arbitrary string which applications can associate with a content control in order to identify it without providing a visible friendly name.
public string Tag { get; set; }
Gets or sets whether the content control shall be removed from the document when the its contents are modified. This property is primarily intended for creating structured document tags whose sole purpose is one-time placeholder text, and which should not return once replaced with content. If false, then the content control shall not be automatically removed when its contents are modified. If true, then the LockControl will be reset to false.
public bool Temporary { get; set; }
Gets or sets the friendly name associated with the content control.
public string Title { get; set; }
Gets the symbol used to represent the unchecked state of the checkbox. This property has effect only for content controls with type CheckBox.
public CheckBoxSymbol UncheckedState { get; }
Gets or sets the relationship between the content control and an Office Web Extension.
public WebExtensionRelationship WebExtensionRelationship { get; set; }
Gets the information which shall be used to establish a mapping between a content control and an XML element stored within a Custom XML Data part in the document. This property has no effect if the property ControlType is BuildingBlockGallery.
public XmlMapping XmlMapping { get; }
Gets string representation of the content.
public override string ToString()
String representation of the content.