Cool Linq Idea: UI Mapping

time to read 1 min | 185 words

This is purely hypotetical, but imagine the following way to show the user's details:

User user = ... ;//Get user something

var view = new View( user, 
 new Text(u => u.Name,  s => user.Name = s),
 new Password( u => u.Password,  s => user.Password = s ),
 new List(from g in user.Groups select g,  g => user.Groups.Add(g), g => user.Groups.Remove(g)) );

Where View is a class which display view items in a TableLayout. And each item knows how to handle changes. This could be a very rapid way to create UI.

What do you think?