Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: NumericUpDown uses the FormatString incorrect [21329]

$
0
0
Line 187 in CommonNumericUpDown.cs
```c#
//Don't know why someone would format a T as %, but just in case they do.
result = FormatString.Contains( "P" )
? _fromDecimal( ParsePercent( text, CultureInfo ) )
: _fromText( text, this.ParsingNumberStyle, CultureInfo );
```

With this line you can not use the Letter "P" in a Format string, even with a leading \ or in literal string delimiter. (" and ')
i think this line should look like this
```c#
result = FormatString.Equals("P",StringComparison.InvariantCultureIgnoreCase)
? _fromDecimal( ParsePercent( text, CultureInfo ) )
: _fromText( text, this.ParsingNumberStyle, CultureInfo );
```
Comments: ** Comment from web user: BoucherS **

Hi,

Without changing anything in the code and using v2.2.1, if I have
```
<xctk:DoubleUpDown Value="12.25" FormatString="0. 'PV'"/>
```

The DoubleUpDown displays "12 PV".

Is this wrong with this FormatString ?


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>