Skip to content

Conversation

@jholzer
Copy link
Contributor

@jholzer jholzer commented Jan 10, 2023

  • Consolidate "FormatText" in base class (it´s nearly the same code in all derived classes)
  • introduce abstract "ParseText" and type specific implementations for usage in "FormatText", which was the only difference in the several implementations
  • return parsed value in "FormatText" to be used in e.g. _PART_TextBox_LostFocus, where it is assgined to "Value" (here´s were "Value" got lost)
  • activate "IsUpdateValueWhenLostFocus" in demo application

Steps to reproduce in original version:

  • enable "IsUpdateValueWhenLostFocus" in WPF-code for NumericUpDown
  • any value (except 0) is visible in numeric up down control
  • click into text field of numeric up down control
  • press tab

Expected behavior: value does not change
Observed behavior: value changes to LastEditingNumericValue, in example: "0"

…ill be overwritten with "LastEditingNumericValue" if "IsUpdateValueWhenLostFocus" is enabled on lost focus

- Consolidate "FormatText" in base class (it´s nearly the same code in all derived classes)
- introduce abstract "ParseText" and type specific implementations for usage in in "FormatText", which was the only difference in the several implementations#
- return parsed value in "FormatText" to be used in e.g. _PART_TextBox_LostFocus, where it is assgined to "Value" (here´s were "Value" got lost)
- activate "IsUpdateValueWhenLostFocus" in demo application
@Dirkster99 Dirkster99 merged commit 2b3bd4a into Dirkster99:master Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants