Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsReadOnlyCaretVisible Property

TextBoxBase.IsReadOnlyCaretVisible Property

.NET Framework 4.6 and 4.5

Gets or sets a value that indicates whether a read-only text box displays a caret.

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public bool IsReadOnlyCaretVisible { get; set; }
<object IsReadOnlyCaretVisible="bool" .../>

Property Value

Type: System.Boolean
true if a read-only text box displays a caret; otherwise, false. The default is false.

When IsReadOnly is true, a user can still select and copy text. If the IsReadOnlyCaretVisible property is also set to true, a caret will appear in the text box when the text box has keyboard focus. When IsReadOnly is false, the IsReadOnlyCaretVisible property has no effect.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft