Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

validate preview input number wpf

using System.Text.RegularExpressions;
private void NumberValidationTextBox(object sender, TextCompositionEventArgs e)
{
    Regex regex = new Regex("[^0-9]+");
    e.Handled = regex.IsMatch(e.Text);
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: sdl quit event not working multiple windows 
Csharp :: save and query mongodb collection as dynamic ExpandoObject 
Csharp :: c# multipthreading 
Csharp :: dictionary plus generic class c# 
Csharp :: c# sequential struct char array fixed size 
Csharp :: How to determine whether Task.Run is completed within a loop in c# 
Csharp :: C# dest 
Csharp :: string.format c# 
Csharp :: .net core 3 entity framework constraint code first image field 
Csharp :: drop column with code first asp.net core 
Csharp :: classe padre figlio c# 
Csharp :: to string c# fields 
Csharp :: List foreach 
Csharp :: get appsetting.json config .net 
Csharp :: cors denied error in asp.net core 
Csharp :: asp net identity extend relationship 
Csharp :: Collision2d and Collider2d 
Csharp :: unity how to change visual studio version 
Csharp :: gegenstände bewegen c# 
Csharp :: c# use meditor from service 
Csharp :: c# class where T : enum 
Csharp :: wpf repository pattern query async with includes properties 
Csharp :: Display the elements in an array one at a time using getkeydown in unity 
Csharp :: how to refrence a variable from other script in c# 
Csharp :: c# one dimensional dictionary 
Csharp :: f# list map function 
Csharp :: how to export xml in linq c# 
Csharp :: Dictionary of array in C# 
Csharp :: get current culture in controller asp.net core 
Csharp :: stack in c# 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =