[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.ContentControl

Class ContentControl

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

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>
Inheritance
object
ContentControl
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

AllowInsertDeleteSection

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; }

Property Value

bool

Appearance

Gets or sets the appearance of the content control.

public ContentControlAppearance Appearance { get; set; }

Property Value

ContentControlAppearance

BuildingBlockCategory

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; }

Property Value

string

BuildingBlockGallery

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; }

Property Value

string

BuiltInBuildingBlock

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; }

Property Value

bool

Checked

Gets or sets whether the checkbox is checked. This property has effect only for content controls with type CheckBox.

public bool Checked { get; set; }

Property Value

bool

CheckedState

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; }

Property Value

CheckBoxSymbol

Color

Gets the color on which to base the visual elements of the content control.

public WordColor Color { get; }

Property Value

WordColor

Content

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; }

Property Value

ControlContent

ControlType

Gets the type for a content control.

public ContentControlType ControlType { get; }

Property Value

ContentControlType

Date

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; }

Property Value

System.DateTime?

DateCalendar

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; }

Property Value

CalendarType

DateFormat

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; }

Property Value

string

DateLocale

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; }

Property Value

string

DateStorageFormat

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; }

Property Value

DateStorageFormat

DropDownItems

Gets the DropDownItemCollection to display in content control if its type is ComboBox or DropdownList.

public DropDownItemCollection DropDownItems { get; }

Property Value

DropDownItemCollection

EndMark

Gets the formatting which shall be applied to the mark present to delimit the end of the control contents.

public ContentControlEndMark EndMark { get; }

Property Value

ContentControlEndMark

Font

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; }

Property Value

Font

Id

Gets or sets a unique numerical ID for the content control.

public int Id { get; set; }

Property Value

int

Level

Gets the content control layout level.

public ContentControlLevel Level { get; }

Property Value

ContentControlLevel

LockContents

Gets or sets whether the contents of the content control can be edited at runtime.

public bool LockContents { get; set; }

Property Value

bool

LockControl

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; }

Property Value

bool

MultiLine

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; }

Property Value

bool

Next

Gets the next content control in a collection.

public ContentControl Next { get; }

Property Value

ContentControl

ParentControl

Gets the parent content control.

public ContentControl ParentControl { get; }

Property Value

ContentControl

PlaceholderText

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; }

Property Value

BuildingBlock

Previous

Gets the previous content control in a collection.

public ContentControl Previous { get; }

Property Value

ContentControl

RepeatingSectionItemTitle

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; }

Property Value

string

ShowingPlaceholderText

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; }

Property Value

bool

Style

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; }

Property Value

Style

Tag

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; }

Property Value

string

Temporary

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; }

Property Value

bool

Title

Gets or sets the friendly name associated with the content control.

public string Title { get; set; }

Property Value

string

UncheckedState

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; }

Property Value

CheckBoxSymbol

WebExtensionRelationship

Gets or sets the relationship between the content control and an Office Web Extension.

public WebExtensionRelationship WebExtensionRelationship { get; set; }

Property Value

WebExtensionRelationship

XmlMapping

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; }

Property Value

XmlMapping

Methods

ToString()

Gets string representation of the content.

public override string ToString()

Returns

string

String representation of the content.