Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Extended TextBox to validate IP Address using Dependency Properties

$
0
0

Hi,

I am working on a desktop application. In my application I have a requirement like User is going to enter an IP Address as string in a textbox. Need to validate, such that user is allowed to enter Numeric and '.' only.

ex: 192.158.66.98

For this, I tried to create Extended TextBox by inheriting TextBox class and in the constructor, I taken event

TextChanged += new EventHandler(OnTextChanged);  and implemented OnTextChanged, but I am unable to validate the user input properly.

If anyone has written any masked textBox or any ExtendedTextBox to validate the IP Address , PLease share.

Any suggestion....much appreciated.

Thanks.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>