Skip to content

NumericUpDown doesn't handle percentages correctly #3280

@ghost

Description

When using NumericUpDown with StringFormats of P0, P1, P, {}{0:P0} or any other combination, entering a textual value of "x%" and unfocusing the control will always revert to 100%.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new NumericUpDown with StringFormat=P0 and a floating point backing property.
  2. Launch the application, and enter 25% into the NumericUpDown using your keyboard.
  3. Unfocus the control.
  4. Notice that the NumericUpDown control reverts back to 100% -- as if the control is reading it as "25" rather than "0.25".

Expected behavior
Entering 25% should result in 25% when unfocusing the control.

Environment(please complete the following information):

  • MahApps.Metro version 1.6.5
  • OS: Win7 7601
  • Visual Studio 2017 15.7.2
  • .NET Framework 4.5.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions