![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Input fields ala Long, Double, Float etc. Hi all, How do I create a input field in XAML that only excepts input data in the form of double, long etc? And show it in the following form. 1.000, 10.000 or 1 000, 10 000 0,50 and so on. Do you have to create this behavior manually or are there control fields that already work like this? I only seem to find the control 'TextBox'. |
| | #2 (permalink) |
| Guest | Re: Input fields ala Long, Double, Float etc. HokutoNoKen wrote: > How do I create a input field in XAML that only excepts input data in > the form of double, long etc? And show it in the following form. > > 1.000, 10.000 or 1 000, 10 000 > 0,50 > and so on. > Do you have to create this behavior manually or are there control > fields that already work like this? I only seem to find the control > 'TextBox'. There is no masked edit control for WPF. You would need to validate input using the KeyDown event to prevent bad characters from being put in. Then, as far formatting, you could use string.Format with the correct numeric formatting string. HTH, Drew ___________________________________ Drew Marsh Chief Software Architect Mimeo.com, Inc. - http://www.mimeo.com Microsoft C# / WPF MVP Weblog - http://blog.hackedbrain.com/ |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fix for long, long, long deleting and copying of files? | Hope | Vista General | 14 | 02-10-2008 06:12 PM |
| Chinese Traditional Input using Phonetic Input | Jess | Vista General | 0 | 01-11-2008 11:56 AM |
| Vista takes a long time from start to long in on SBS2003 network...... | mlai | Vista networking & sharing | 9 | 12-04-2007 02:10 AM |
| Missing manual recipient input fields? - 2nd Request | Blue Max | Vista print fax & scan | 4 | 06-09-2007 10:16 AM |
| Missing manual recipient input fields in send dialog? | Blue Max | Vista print fax & scan | 0 | 05-17-2007 07:12 PM |