As Jono Moore mentioned you can control the display using the patterns.
Display Pattern: text{999-999-9999}
Edit Pattern: text{9999999999}|text{999.999.9999}|text{999-999-9999}
But when you want to store the data to DB, the text field will store only the numbers without the formatting. So when you want to display the phone number from the database, the field will know how to format it back to xxx-xxx-xxxx.
Workaround:
But if your intention is to store the phone number as xxx-xxx-xxxx into the DB, then place a hidden field on the form and bind that field to your DB field
On the exit event of the phone number field assign the formatted value to the hidden field.
Donot put any pattern on the hidden field.
Insted of storing the data from the phone number field, store the value of the hidden field to your database.
In the exit event of the phone number field write:
HiddenField.rawValue = PhoneNumberField.formattedValue;
Thanks
Srini