aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
commitebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch)
tree293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
parent52967e858bd52621208f6360e84f4c47ec435816 (diff)
parent636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff)
downloadTango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz
Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip
merge alarm handling from remote
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index fa57169f3..6fbce65bf 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -13,6 +13,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using Tango.SharedUI.Controls;
namespace Tango.Touch.Controls
{
@@ -20,7 +21,7 @@ namespace Tango.Touch.Controls
{
private TextBox _text_box;
private bool _prevent_text_change;
- private TextBlock _text_block;
+ private FastTextBlock _text_block;
private double _lastValue;
Regex regex_integer = new Regex(@"^-?[0-9]\d*(\d+)?$");
Regex regex_double = new Regex(@"^-?[0-9]\d*(\.\d+)?$");
@@ -48,6 +49,18 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty WatermarkProperty =
DependencyProperty.Register("Watermark", typeof(String), typeof(TouchNumericTextBox), new PropertyMetadata(null));
+
+
+ public bool DisplayWatermarkHint
+ {
+ get { return (bool)GetValue(DisplayWatermarkHintProperty); }
+ set { SetValue(DisplayWatermarkHintProperty, value); }
+ }
+ public static readonly DependencyProperty DisplayWatermarkHintProperty =
+ DependencyProperty.Register("DisplayWatermarkHint", typeof(bool), typeof(TouchNumericTextBox), new PropertyMetadata(false));
+
+
+
public String StringFormat
{
get { return (String)GetValue(StringFormatProperty); }
@@ -101,7 +114,7 @@ namespace Tango.Touch.Controls
base.OnApplyTemplate();
_text_box = GetTemplateChild("PART_TextBox") as TextBox;
- _text_block = GetTemplateChild("PART_TextDisplay") as TextBlock;
+ _text_block = GetTemplateChild("PART_TextDisplay") as FastTextBlock;
_text_box.PreviewTextInput += _text_box_PreviewTextInput;
_text_box.PreviewKeyDown += _text_box_PreviewKeyDown;
_text_box.LostFocus += _text_box_LostFocus;