EditableTextBlock

Ecng.Xaml

A TextBlock that can be switched into an inline edit mode, rendering a TextBox adorner on top of itself.

Inherits: TextBlock

Properties

EditOnDoubleClick
public bool EditOnDoubleClick { get; set; }
value = editableTextBlock.EditOnDoubleClick
editableTextBlock.EditOnDoubleClick = value

Gets or sets a value indicating whether double-clicking the control switches it to edit mode.

IsInEditMode
public bool IsInEditMode { get; set; }
value = editableTextBlock.IsInEditMode
editableTextBlock.IsInEditMode = value

Gets or sets a value indicating whether the control is currently in edit mode. When set to true, an adorner with a TextBox is shown allowing the text to be edited.

MaxLength
public int MaxLength { get; set; }
value = editableTextBlock.MaxLength
editableTextBlock.MaxLength = value

Gets or sets the maximum number of characters that can be entered while in edit mode.

Methods

OnMouseDown
protected override void OnMouseDown(MouseButtonEventArgs e)
editableTextBlock.OnMouseDown(e)

Handle a mouse down event.

e

Fields

EditOnDoubleClickProperty
public static readonly DependencyProperty EditOnDoubleClickProperty
value = EditableTextBlock.EditOnDoubleClickProperty

Identifies the EditOnDoubleClick dependency property.

IsInEditModeProperty
public static readonly DependencyProperty IsInEditModeProperty
value = EditableTextBlock.IsInEditModeProperty

Identifies the IsInEditMode dependency property.

MaxLengthProperty
public static readonly DependencyProperty MaxLengthProperty
value = EditableTextBlock.MaxLengthProperty

Identifies the MaxLength dependency property.