Extends the base WPF TextBox to add key bindings: Return and Enter commit the current Text value to its binding source, Esc reverts the Text value to current value in the binding source.
Public Member Functions |
|
TextField () | |
Constructor. |
|
Static Public Attributes |
|
static readonly DependencyProperty | BindEnterToUpdateSourceCommandProperty |
Controls if the Enter key is bound to the
UpdateSourceCommand RoutedCommand. |
|
Properties |
|
bool |
BindEnterToUpdateSourceCommand [get, set] |
Controls if the Enter key is bound to the
UpdateSourceCommand RoutedCommand. |
WPFCustomControls::TextField::TextField | ( | ) | [inline] |
Constructor.
readonly DependencyProperty
WPFCustomControls::TextField::BindEnterToUpdateSourceCommandProperty
[static] |
DependencyProperty.Register( "BindEnterToUpdateSourceCommand", typeof(bool), typeof(TextField), new PropertyMetadata(true) )
Controls if the Enter key is bound to the UpdateSourceCommand RoutedCommand.
Defaults to true.
It may be desirable to set this to false if the TextField's parent container handles the enter key event to confirm the edited value.
bool
WPFCustomControls::TextField::BindEnterToUpdateSourceCommand
[get, set] |
Controls if the Enter key is bound to the UpdateSourceCommand RoutedCommand.
Defaults to true.
It may be desirable to set this to false if the TextField's parent container handles the enter key event to confirm the edited value.