Back to Devexpress

ContentControlBase.ControlType Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-contentcontrolbase.md

latest3.9 KB
Original Source

ContentControlBase.ControlType Property

Indicates the content control type.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
ContentControlType ControlType { get; }
vb
ReadOnly Property ControlType As ContentControlType

Property Value

TypeDescription
ContentControlType

An enumeration value that indicates the content control type.

|

Available values:

NameDescription
RichText

Rich text content control.

| | PlainText |

Plain text content control.

| | Picture |

Picture content control.

| | BuildingBlockGallery |

Building block gallery.

| | ComboBox |

Combo box content control.

| | DropDownList |

Drop-down list content control.

| | Date |

Date picker content control.

| | Checkbox |

Checkbox content control.

| | RepeatingSection |

Repeating section content control.

| | RepeatingSectionItem |

An item in the repeating section content control.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the ControlType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/ContentControlActions.cs#L57

csharp
contentControl.Color = Color.Red;
switch (contentControl.ControlType)
{

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/ContentControls.cs#L58

csharp
contentControl.Color = Color.Red;
switch (contentControl.ControlType)
{

word-document-api-examples/CS/CodeExamples/ContentControlsActions.cs#L60

csharp
contentControl.Color = Color.Red;
switch (contentControl.ControlType) {
    case ContentControlType.RichText:

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/ContentControls.vb#L48

vb
contentControl.Color = System.Drawing.Color.Red
Select Case contentControl.ControlType
    Case DevExpress.XtraRichEdit.API.Native.ContentControlType.RichText, DevExpress.XtraRichEdit.API.Native.ContentControlType.PlainText

See Also

ContentControlBase Interface

ContentControlBase Members

DevExpress.XtraRichEdit.API.Native Namespace