Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Input fields ala Long, Double, Float etc.

Closed Thread
 
Thread Tools Display Modes
Old 06-21-2006   #1 (permalink)
HokutoNoKen
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'.


Old 06-21-2006   #2 (permalink)
Drew Marsh
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/


Closed Thread

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








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50