WinUI3 : How to stop text rendering in NumberBox

Harshithraj1871 1,516 Reputation points
2022-11-22T12:52:25.67+00:00

Hi,

I was using NumberBox for number input and noticed that it was rendering the characters/text entered in it [It was removing the entered text after the "Enter" press or FocusLost]. I was searching for an experience where characters entered in NumberBox will not be displayed on any point, only numbers entered in NumberBox should be rendered.

I didn't find any event in NumberBox like TextChanging[in TextBox] so that I can handle the input text before it is rendered on screen. One way i can think of now is to use TextBox and handle the event TextChanging and handle only numbers to render on screen.

It would be of great help if you can point me to the right experience where only numbers entered will be displayed in NumberBox.

Thank you

Universal Windows Platform (UWP)
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
749 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,626 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful