@@ -118,7 +118,7 @@ private static void OnNumericValueChanged(DependencyObject d, DependencyProperty
118118
119119 if ( upDownBase . _textBoxField is { } textBox )
120120 {
121- textBox . Text = e . NewValue . ToString ( ) ;
121+ textBox . Text = Convert . ToString ( e . NewValue , CultureInfo . CurrentCulture ) ;
122122 }
123123
124124 upDownBase . UpdateDecreaseButtonEnabled ( ) ;
@@ -224,7 +224,7 @@ public override void OnApplyTemplate()
224224 {
225225 _textBoxField . TextChanged += OnTextBoxTextChanged ;
226226 _textBoxField . LostFocus += OnTextBoxLostFocus ;
227- _textBoxField . Text = Value ? . ToString ( ) ;
227+ _textBoxField . Text = Convert . ToString ( Value , CultureInfo . CurrentCulture ) ;
228228 }
229229
230230 }
@@ -233,15 +233,15 @@ private void OnTextBoxLostFocus(object sender, EventArgs e)
233233 {
234234 if ( _textBoxField is { } textBoxField )
235235 {
236- textBoxField . Text = Value ? . ToString ( ) ;
236+ textBoxField . Text = Convert . ToString ( Value , CultureInfo . CurrentCulture ) ;
237237 }
238238 }
239239
240240 private void OnTextBoxTextChanged ( object sender , EventArgs e )
241241 {
242242 if ( _textBoxField is { } textBoxField )
243243 {
244- if ( TryParse ( textBoxField . Text , CultureInfo . CurrentUICulture , out T ? value ) )
244+ if ( TryParse ( textBoxField . Text , CultureInfo . CurrentCulture , out T ? value ) )
245245 {
246246 SetCurrentValue ( ValueProperty , ClampValue ( value ) ) ;
247247 }
0 commit comments