Horje
wpf numeric only textbox Code Example
wpf numeric only textbox
<TextBox Name="NumberTextBox" PreviewTextInput="NumberValidationTextBox"/>

-------------------------------------------------------------------------------

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




Csharp

Related
c# length 2d array Code Example c# length 2d array Code Example
load prefab in script unity Code Example load prefab in script unity Code Example
convert base64 string to string c# Code Example convert base64 string to string c# Code Example
check distance to gameobject Code Example check distance to gameobject Code Example
print in c# Code Example print in c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10