Back to Devexpress

TextEditBase.CaretBrush Property

wpf-devexpress-dot-xpf-dot-editors-dot-texteditbase-ba378049.md

latest2.7 KB
Original Source

TextEditBase.CaretBrush Property

Gets or sets the TextEditBase caret color. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public Brush CaretBrush { get; set; }
vb
Public Property CaretBrush As Brush

Property Value

TypeDescription
Brush

The TextEditBase caret color.

|

Remarks

The following code sample specifies the CaretBrush , CornerRadius, SelectionBrush, and SelectionOpacity properties:

xaml
<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
    <StackPanel>
        <dxe:TextEdit Margin="5" Padding="2,4"
                      BorderThickness="2" EditValue="Custom Appearance"
                      CornerRadius="14" Background="#FFE9EBEC"
                      BorderBrush="#FFE9EBEC" CaretBrush="Red"
                      SelectionBrush="BlueViolet" SelectionOpacity="0.1"/>
    </StackPanel>
</Window>

Note

The property is supported in the following DevExpress themes:

Theme FamilyThemes
Windows 11Dark, Light
Windows 10Dark, Light
Office 2019Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019Blue, Dark, Light
Office 2016 SEBlack, Colorful, Dark Gray, White
Visual Studio 2017Blue, Dark, Light

See Also

TextEditBase Class

TextEditBase Members

DevExpress.Xpf.Editors Namespace