From 51248edbd31b9df152aa4a3fe3436487f8f94d14 Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Wed, 1 Oct 2025 20:12:30 +0300 Subject: [PATCH] restrict input for numeric controls allow input dots --- Azaion.Common/Controls/NumericUpDown.xaml | 4 +++- Azaion.Common/Controls/NumericUpDown.xaml.cs | 25 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Azaion.Common/Controls/NumericUpDown.xaml b/Azaion.Common/Controls/NumericUpDown.xaml index 57fa233..d6c4f39 100644 --- a/Azaion.Common/Controls/NumericUpDown.xaml +++ b/Azaion.Common/Controls/NumericUpDown.xaml @@ -23,8 +23,10 @@ TextAlignment="Right" VerticalAlignment="Center" VerticalContentAlignment="Center" - Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type local:NumericUpDown}}}" + Text="{Binding Value, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type local:NumericUpDown}}}" LostFocus="NudTextBox_OnLostFocus" + PreviewTextInput="NudTextBox_OnPreviewTextInput" + DataObject.Pasting="NudTextBox_OnPasting" />