views:

33

answers:

1

Say I have a Date, or a Phone number, or some Class which I don't actually want to store as a string at runtime, but which could have a nice short string serialization for serialization as a XAML attribute:

<Person PhoneNumber="+1-123-123-1234"/>

How do I make my type serialized in that representation?

+2  A: 

See this msdn article for information on custom XAML Serialisation. See here for an example.

Preet Sangha
The MSDN article I found pretty useless, but the other one is awesome.
Tim Lovell-Smith