From 4a41df0b200191ce96a13fb80412e51d46f08cb4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 27 Oct 2019 14:07:14 +0200 Subject: Fixed a bug with PPC storage invalid file na chars. --- Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs') diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs index beb7e0c18..224de18a8 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs @@ -24,13 +24,20 @@ namespace Tango.Touch.Controls private PasswordBox _password_box; private DateTime _lost_focus_time; + public event EventHandler TextChanged; + public String Text { get { return (String)GetValue(TextProperty); } set { SetValue(TextProperty, value); } } public static readonly DependencyProperty TextProperty = - DependencyProperty.Register("Text", typeof(String), typeof(TouchTextBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); + DependencyProperty.Register("Text", typeof(String), typeof(TouchTextBox), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, (d, e) => (d as TouchTextBox).OnTextChanged())); + + private void OnTextChanged() + { + TextChanged?.Invoke(this, new EventArgs()); + } public String Watermark { -- cgit v1.3.1