# Syntax Highlighting

## Content

[ExpressionEditor](/componentone/api/win/online-expressioneditor/dotnet-api/C1.Win.ExpressionEditor.10/C1.Win.ExpressionEditor.html) supports syntax highlighting to visually distinguish functions and fields within expressions. Color-coded display improves readability and helps differentiate expression elements. The [SyntaxHighlighting](/componentone/api/win/online-expressioneditor/dotnet-api/C1.Win.ExpressionEditor.10/C1.Win.ExpressionEditor.C1ExpressionEditor.SyntaxHighlighting.html) property of the `C1ExpressionEditor` class controls whether syntax highlighting is enabled.

>type=note
> **<span data-loadable-vc-wrapper="true" data-ssr-placeholder-replace="Hm6N8:EfLS5:z8NN7:qz-Pe:OP-5u-0">Note</span>**<span data-loadable-vc-wrapper="true" data-ssr-placeholder-replace="Hm6N8:EfLS5:z8NN7:qz-Pe:OP-5u-0">: Operators and constants are not highlighted.</span>

***

## Enabling and Disabling Syntax Highlighting

Syntax highlighting in `ExpressionEditor` is controlled through the `SyntaxHighlighting` and [IntelliSyntaxHighlightingEnabled](/componentone/api/win/online-expressioneditor/dotnet-api/C1.Win.ExpressionEditor.10/C1.Win.ExpressionEditor.C1ExpressionEditor.IntelliSyntaxHighlightingEnabled.html) properties. Both properties must be enabled for syntax highlighting to function.

| Property | Type | Description | Default |
| -------- | ---- | ----------- | ------- |
| `SyntaxHighlighting` | `bool` | Enables or disables visual syntax highlighting within the editor.<br>This property requires `IntelliSyntaxHighlightingEnabled` to also be enabled. | `true` |
| `IntelliSyntaxHighlightingEnabled` | `bool` | Enables or disables the internal syntax-highlighting engine used by the editor. | `true` |

The following example enables the syntax-highlighting engine and visual syntax highlighting:

```auto
// Disable syntax highlighting
c1ExpressionEditor1.SyntaxHighlighting = false;

// Enable syntax highlighting
c1ExpressionEditor1.IntelliSyntaxHighlightingEnabled = true;
c1ExpressionEditor1.SyntaxHighlighting = true;
```

***

## Customizing Syntax Highlighting

The `C1ExpressionEditor` control provides a [Theme](/componentone/api/win/online-expressioneditor/dotnet-api/C1.Win.ExpressionEditor.10/C1.Win.Themes.Design.html) property for customizing the visual appearance of the editor, including syntax-highlighting colors and styles.
The `Theme` property is declared as an [ExpressionEditorTheme](/componentone/api/win/online-expressioneditor/dotnet-api/C1.Win.ExpressionEditor.10/C1.Win.ExpressionEditor.UI.ExpressionEditorTheme.html) object and supports expansion through the `ExpandableObjectConverter` type converter.

```auto
[TypeConverter(typeof(ExpandableObjectConverter))]
public ExpressionEditorTheme Theme { get; set; }
```

The `Theme` property exposes expandable sub-properties that configure individual visual settings for the editor. At design time, these settings appear as expandable entries in the Visual Studio Properties window.