# Content Controls UI

The easiest way to create a content control is through the user interface. You can also create them programmatically following the [Working with Content Controls Programmatically](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/features/content-controls/working-with-content-controls) article.

## User Interface

You can specify which type of content control you wish to insert from the predefined UI of RadRichTextBox. You can select it from the Developer Tab which is part of the [RadRichTextBoxRibbonUI](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/ui-for-applying-rich-text-formatting/features-radrichtextboxribbonui) by default:

![RadRichTextBox Features Content Controls 00](https://www.telerik.com/products/wpf/documentation/assets/ae21a39c59e5f1c9f5e0274d2034d2c0/radrichtextbox_features_content_controls_00.jpg)

You can choose between the following content controls:

* **Rich Text** content control
* **Plain Text** content control
* **Picture** content control
* **Repeating Section** content control
* **Check Box** content control
* **Combo Box** content control
* **Drop-Down List**  content control
* **Date Picker** content control

### Content Controls Commands

The following commands related to the content controls functionality are available in the Commands property of the RadRichTextBox:

* **InsertStructuredDocumentTagCommand**

  In order to successfully execute the InsertStructuredDocumentTagCommand you have to pass the wanted content control type (**SdtType**) as a CommandParameter:

  #### \[XAML] Example 1: Binding the command

  ```XAML

          <telerik:RadRibbonButton 
                          telerik:ScreenTip.Description="Insert a picture content control."
                          SmallImage="{telerik:IconResource IconRelativePath=16/contentControl-picture.png,IconSources={StaticResource IconSources}}" 
                          telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertStructuredDocumentTagCommand}"
                          CommandParameter="Picture"
                          Size="Small" telerik:ScreenTip.Title="Picture Content Control">
          </telerik:RadRibbonButton>
  ```

* **ShowContentControlPropertiesDialogCommand**

  #### \[XAML] Example 2: Binding the command

  ```XAML

          <telerik:RadRibbonButton x:Name="propertiesDialogButton"
                          telerik:ScreenTip.Description="View or modify properties for the selected control."
                          SmallImage="{telerik:IconResource IconRelativePath=16/contentControl-properties.png,IconSources={StaticResource IconSources}}"
                          telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowContentControlPropertiesDialogCommand}"
                          CommandParameter="Sdt"
                          Size="Medium" telerik:ScreenTip.Title="Control Properties"
                          Text="Properties">
          </telerik:RadRibbonButton>
  ```

  > tip In order to learn more about commands and how to use them refer to [Commands](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/features/commands) help article.

### Dialogs

You can manipulate the properties for every specific content control using the assigned Properties Dialog which you can open from the Properties button.

![RadRichTextBox Features Content Controls 01](https://www.telerik.com/products/wpf/documentation/assets/9a7f302b94fc478f9c7f7fe48f92367c/radrichtextbox_features_content_controls_01.jpg)

These are the predefined Properties Dialogs:

* **RichTextPropertiesDialog**
* **PlainTextPropertiesDialog**
* **PicturePropertiesDialog**
* **RepeatingSectionPropertiesDialog**
* **CheckBoxPropertiesDialog**
* **DropDownListPropertiesDialog**
* **DatePickerPropertiesDialog**

  ![RadRichTextBox Features Content Controls 02](https://www.telerik.com/products/wpf/documentation/assets/f6cdd2c76abe01aeaec50867c6e25251/radrichtextbox_features_content_controls_02.png)

## See Also

* [Content Controls Overview](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/features/content-controls/content-controls)
* [Manipulating Annotations](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/document-elements/annotations/features-manipulating-annotations)
* [Working with Content Controls](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/features/content-controls/working-with-content-controls)
