Class EditableTextBlock
TextBlock which is editable and shows a water mark in case it is not edited or has not the focus
Inheritance
EditableTextBlock
Implements
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class EditableTextBlock : WatermarkTextBox, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, INotifyPropertyChanged
Fields
View SourceBlockForegroundProperty
sets, gets the foreground color
Declaration
public static readonly DependencyProperty BlockForegroundProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EditableProperty
flag to decide whether the TextBlock is editable or not
Declaration
public static readonly DependencyProperty EditableProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsInEditModeProperty
flag to decide whether the TextBlock currently is in edit mode
Declaration
public static readonly DependencyProperty IsInEditModeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
View SourceBlockForeground
sets, gets the foreground color
Declaration
public Brush BlockForeground { get; set; }
Property Value
| Type | Description |
|---|---|
| Brush |
Editable
flag to decide whether the TextBlock is editable or not
Declaration
public bool Editable { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInEditMode
flag to decide whether the TextBlock currently is in edit mode
Declaration
public bool IsInEditMode { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceOnApplyTemplate()
Declaration
public override void OnApplyTemplate()
Overrides
View SourceOnKeyDown(KeyEventArgs)
Handle the key down event.
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter e is never null")]
protected override void OnKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyEventArgs | e |
Overrides
View SourceOnLostFocus(RoutedEventArgs)
Overrides OnLostFocus to set IsInEditMode to false
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| RoutedEventArgs | e |
Overrides
View SourceOnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Overrides OnPreviewLostKeyboardFocus to set IsInEditMode to false
Declaration
protected override void OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyboardFocusChangedEventArgs | e |