views:

76

answers:

0

I'm using System.ComponentModel.DataAnnotations to give codesmith (using reflection to parse the field-attributes on BE) UI-hints to build my views. But I find DataAnnotations is limited enough. I like something richest, building new custom attributes where one could have more settings to build also complex user interface. I'm too lazy to reinvent to wheel, writing all the attributes from scratch. An example:

[UIHint(UIGroup="Identity",Field="Name",HighlightOnFocus="true",Position="inline"]
public string Name {get; set;}

[UIHint(UIGroup="Identity",Field="FamilyName",HighlightOnFocus="true",Position="inline"]
public string FamilyName {get; set;}

[UIHint(UIGroup="Address",Field="PostalCode",HighlightOnFocus="true",Localize="true"]
public string ZipCode {get; set;}

In the HTML code UIGroup Identity will be wrapped into a html fielset, every field set is separated with an <*hr>. The same in a win form.

Any tip (or any project) is really welcome!!

PS: of course I will use css for strictly related html elements