# Configure the .NET MAUI ComboBox

Use this article to configure the most common [.NET MAUI ComboBox](https://www.telerik.com/maui-ui/documentation/controls/combobox/overview) behaviors, including placeholder text, text input, spell checking, the clear button, drop-down behavior, keyboard type, and theme-aware placeholder color.

## What Can You Configure in the ComboBox

Use the following areas depending on the behavior you want to change:

| Area               | Main Properties                                                                                                                                  | Use It When                                                        |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
| Placeholder        | `Placeholder`, `PlaceholderColor`                                                                                                                | You want to guide the user before a value is selected or entered.  |
| Text input         | `Text`, `IsSpellCheckEnabled`, `Keyboard`                                                                                                        | You want to control what the user types and how the input behaves. |
| Clear action       | `IsClearButtonVisible`                                                                                                                           | You want to show or hide the clear button.                         |
| Drop-down behavior | `DropDownWidth`, `DropDownHeight`, `DropDownMaxHeight`, `DropDownVerticalOffset`, `IsDropDownOpen`, `IsDropDownClosedOnSelection`, `OpenOnFocus` | You want to control how the drop-down opens, closes, and appears.  |

## Placeholder

Use the placeholder properties when you want to guide the user before input or selection:

* `Placeholder` (`string`)—Sets the guidance text shown when the input is empty or when the selected item or items are cleared.
* `PlaceholderColor` (`Color`)—Defines the color of the placeholder text.

The following example sets the `Placeholder` property:

```XAML
<telerik:RadComboBox Placeholder="Select City!" 
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="placeholderCombo"/>
```

The following image shows the result:

![ComboBox Placeholder](https://www.telerik.com/maui-ui/documentation/assets/14ec08f01fbb8c9eadd83a386d22d66e/combobox-placeholder.png)

The following example sets the `PlaceholderColor` property:

```XAML
<telerik:RadComboBox Placeholder="Select City!"
                     PlaceholderColor="#8660C5"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="placeholderColorCombo"/>
```

The following image shows the result:

![.NET MAUI ComboBox Placeholder Color](https://www.telerik.com/maui-ui/documentation/assets/bcc2e002326dbeb1ae318f6ca870da8d/combobox-placeholder-color.png)

## Text

Use the `Text` property of type `string` when you want to set or read the visible text of the control. This text appears when:

* The ComboBox is editable.
* The ComboBox is non-editable and the selection mode is single.

## Spell Checking

Use `IsSpellCheckEnabled` (`bool`) to control whether spell checking is enabled in the ComboBox input. The default value is `False`. When spell checking is enabled, misspellings are indicated in the input field.

The following example applies `IsSpellCheckEnabled`:

```XAML
<telerik:RadComboBox IsEditable="True"
                     IsSpellCheckEnabled="True"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="spellCheckCombo"/>
```

## Clear Button Visibility

Use `IsClearButtonVisible` (`bool`) to show or hide the clear **X** button. The default value is `True`.

The following example sets `IsClearButtonVisible`:

```XAML
<telerik:RadComboBox IsClearButtonVisible="False" 
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Population"
                     IsEditable="True"
                     SearchTextPath="Population"
                     Keyboard="Numeric"
                     AutomationId="noClearButtonCombo"/>
```

The following image shows the result:

![ComboBox Clear Button Visibility](https://www.telerik.com/maui-ui/documentation/assets/fc6ec6f2df15fa954f184ee09a23d68e/combobox-clearbuttonvisibility.png)

> note
> For a complete ComboBox configuration example, see the [SDKBrowser App](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and navigate to **ComboBox** > **Features**.

## Drop-Down Behavior

Use the following properties to control how the drop-down opens, closes, and appears:

* `DropDownWidth` (`double`)—Defines the width of the drop-down.
* `DropDownHeight` (`double`)—Defines the height of the drop-down.
* `DropDownMaxHeight` (`double`)—Defines the max height of the drop-down. Always set the `DropDownMaxHeight`, so that you can have a predefined height for the drop-down. If using both the `DropDownMaxHeight` and `DropDownHeight` properties, the max height value must be higher.
* `DropDownVerticalOffset` (`double`)—Defines the vertical offset of the drop-down part of the control. This property allows an option to modify the control with no space between the ComboBox and the drop-down.
* `IsDropDownOpen` (`bool`)—Defines whether the drop-down part of the control is opened. The default value is `false`.
* `IsDropDownClosedOnSelection` (`bool`)—Defines whether the drop-down will be closed when the item is selected or deselected. The default value is `true`.

The following example sets `DropDownWidth`:

```XAML
<telerik:RadComboBox DropDownWidth="70"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="dropdownWidthCombo"/>
```

The following example sets `DropDownHeight`:

```XAML
<telerik:RadComboBox DropDownHeight="30"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="dropdownHeightCombo"/>
```

The following example sets `DropDownMaxHeight`:

```XAML
<telerik:RadComboBox DropDownMaxHeight="200"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="dropdownMaxHeightCombo"/>
```

The following example sets `DropDownVerticalOffset`:

```XAML
<telerik:RadComboBox DropDownVerticalOffset="25"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="dropdownVerticalOffsetCombo"/>
```

The following example sets `IsDropDownClosedOnSelection`:

```XAML
<telerik:RadComboBox IsDropDownClosedOnSelection="False"
                     ItemsSource="{Binding Items}"
                     DisplayMemberPath="Name"
                     AutomationId="openedAfterSelectionCombo"/>
```

The following example sets `OpenOnFocus`:

```XAML
<telerik:RadComboBox OpenOnFocus="False" 
                     ItemsSource="{Binding Items}"
                     IsEditable="True"
                     SearchTextPath="Name"
                     DisplayMemberPath="Name"
                     AutomationId="notOpeningOnFocusCombo"/>
```

> tip
> See [Add a Select All option in the ComboBox drop-down](https://www.telerik.com/maui-ui/documentation/knowledge-base/adding-select-all-option-combobox-dropdown-net-maui) if you want to let users select all items from the drop-down list.

## Keyboard

Use the `Keyboard` (`Microsoft.Maui.Keyboard`) property to define which on-screen keyboard the device shows. The default value is `Default`.

> note
> For a ComboBox drop-down configuration example, see the [SDKBrowser App](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and navigate to **ComboBox** > **Features**.

## See Also

* [Data Binding](https://www.telerik.com/maui-ui/documentation/controls/combobox/databinding)
* [Edit Mode & Search](https://www.telerik.com/maui-ui/documentation/controls/combobox/editmode-and-search)
* [Selection](https://www.telerik.com/maui-ui/documentation/controls/combobox/selection)
