So I have started reading some books and articles on architecture. They all state (put a little simply) that you should never let your view access the model directly, when using a Model-View-ViewModel (MVVM) pattern. Instead there should be a view model for each model.

One of the ideas is, as I understand it, that formatting can be done in the view model, which will then mainly contain strings. An example could be a person model which looks like this:

Now this approach is quite nice, since you don't need to consider string formats in something like XAML (if you are using WPF) or whatever GUI stuff you are working with.

But here is my question; what do I do with the setters using this approach? They obviously need the same input type (string) as the getter, at least when using C# with WPF. I could of course make a custom setter, like this: