![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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'. |
My System Specs![]() |
| | #2 (permalink) |
| | 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/ |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: Virtual PC 2007 Mouse pointer disappears from input fields in guest OS | Virtual PC | |||
| Fix for long, long, long deleting and copying of files? | Vista General | |||
| Chinese Traditional Input using Phonetic Input | Vista General | |||
| Missing manual recipient input fields? - 2nd Request | Vista print fax & scan | |||
| Missing manual recipient input fields in send dialog? | Vista print fax & scan | |||