Is there a way to create Numberic Textboxes using WPF xaml code?

54 Views Asked by At

I am new to WPF. I need to create textboxes which is only accept digits. Not accepted any special characters, letters .

And the important thing is , the code is only xaml not c#.

I googled lot of websites , but i only get the code used c#. But i want in XAML code. Because i enclosed it like styles in controls.

Is there any way to do this? And if it is not possible Why?

1

There are 1 best solutions below

0
mm8 On

No, it's not possible because XAML is a markup language. It has no support for distinguishing between digits and other type of characters.

You should use a programming language such as C# to implement this kind of logic.