Volume Control
Application-specific hotkeys for Windows
VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior Class Reference

Forces the TextBox.Text property's data binding to update its source when the Enter key is pressed or released. More...

Inheritance diagram for VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior:
Collaboration diagram for VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior:

Public Types

enum class  EKeyEvent { KeyUp , KeyDown }
 Defines the key press events that the TextBoxEnterUpdatesTextSourceBehavior can attach to. More...
 

Static Public Attributes

static readonly DependencyProperty OnKeyEventProperty
 The DependencyProperty for OnKeyEvent. More...
 

Protected Member Functions

override void OnAttached ()
 
override void OnDetaching ()
 

Properties

EKeyEvent OnKeyEvent [get, set]
 Gets or sets whether to update the Text binding's source when the Enter key is pressed or when it is released. More...
 

Detailed Description

Forces the TextBox.Text property's data binding to update its source when the Enter key is pressed or released.

Member Enumeration Documentation

◆ EKeyEvent

Defines the key press events that the TextBoxEnterUpdatesTextSourceBehavior can attach to.

Enumerator
KeyUp 

The Text databinding is updated when the Enter key is released.

KeyDown 

The Text databinding is updated when the Enter key is pressed.

Member Data Documentation

◆ OnKeyEventProperty

readonly DependencyProperty VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior.OnKeyEventProperty
static
Initial value:
= DependencyProperty.Register(
nameof(OnKeyEvent),
typeof(EKeyEvent),
typeof(TextBoxEnterUpdatesTextSourceBehavior),
new PropertyMetadata(EKeyEvent.KeyUp, OnKeyEventPropertyChanged))
EKeyEvent OnKeyEvent
Gets or sets whether to update the Text binding's source when the Enter key is pressed or when it is ...
Definition: TextBoxEnterUpdatesTextSourceBehavior.cs:49
EKeyEvent
Defines the key press events that the TextBoxEnterUpdatesTextSourceBehavior can attach to.
Definition: TextBoxEnterUpdatesTextSourceBehavior.cs:24

The DependencyProperty for OnKeyEvent.

Property Documentation

◆ OnKeyEvent

EKeyEvent VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior.OnKeyEvent
getset

Gets or sets whether to update the Text binding's source when the Enter key is pressed or when it is released.

Returns
EKeyEvent.KeyUp when updates occur when released; EKeyEvent.KeyDown when updates occur when pressed.

Referenced by VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior.OnAttached(), and VolumeControl.WPF.Behaviors.TextBoxEnterUpdatesTextSourceBehavior.OnDetaching().


The documentation for this class was generated from the following file: