@@ -118,7 +118,7 @@ private static void OnNumericValueChanged(DependencyObject d, DependencyProperty
118
118
119
119
if ( upDownBase . _textBoxField is { } textBox )
120
120
{
121
- textBox . Text = e . NewValue . ToString ( ) ;
121
+ textBox . Text = Convert . ToString ( e . NewValue , CultureInfo . CurrentCulture ) ;
122
122
}
123
123
124
124
upDownBase . UpdateDecreaseButtonEnabled ( ) ;
@@ -224,7 +224,7 @@ public override void OnApplyTemplate()
224
224
{
225
225
_textBoxField . TextChanged += OnTextBoxTextChanged ;
226
226
_textBoxField . LostFocus += OnTextBoxLostFocus ;
227
- _textBoxField . Text = Value ? . ToString ( ) ;
227
+ _textBoxField . Text = Convert . ToString ( Value , CultureInfo . CurrentCulture ) ;
228
228
}
229
229
230
230
}
@@ -233,15 +233,15 @@ private void OnTextBoxLostFocus(object sender, EventArgs e)
233
233
{
234
234
if ( _textBoxField is { } textBoxField )
235
235
{
236
- textBoxField . Text = Value ? . ToString ( ) ;
236
+ textBoxField . Text = Convert . ToString ( Value , CultureInfo . CurrentCulture ) ;
237
237
}
238
238
}
239
239
240
240
private void OnTextBoxTextChanged ( object sender , EventArgs e )
241
241
{
242
242
if ( _textBoxField is { } textBoxField )
243
243
{
244
- if ( TryParse ( textBoxField . Text , CultureInfo . CurrentUICulture , out T ? value ) )
244
+ if ( TryParse ( textBoxField . Text , CultureInfo . CurrentCulture , out T ? value ) )
245
245
{
246
246
SetCurrentValue ( ValueProperty , ClampValue ( value ) ) ;
247
247
}
0 commit comments