Reputation: 17030
I'am looking for a tool, which can generate a user Interface from a class. Let me have an example.
This class with some pseudo attributes:
class BussinessModel
{
[UiReadOnly]
[UiSingleLine]
public int Id { get; set; }
[UiSingleLine]
public string Tile { get; set; }
[UiMultiLine]
public string Description { get; set; }
}
could generate a UI (XAML for the ui) like this:
EDIT: I fogot to mention about I want "ready to use" bindings which can be used when the given class is the viewmodel (MVVM)
Is there any tool out there which can do something like this (with a single click)?
Upvotes: 2
Views: 1478
Reputation: 1861
You could look at Naked Objects (https://github.com/NakedObjectsGroup/NakedObjectsFramework)
and maybe Executable UML (https://en.wikipedia.org/wiki/Executable_UML)
Naked Objects will dynamically generate Web UI from class definitions at runtime. It also handles persistence via EntityFramework.
Upvotes: 0
Reputation: 26
What you basically need is a dataform.
a search on the "wpf dataform" gives the following link :
http://www.silverlightshow.net/items/Creating-Rich-Data-Forms-in-Silverlight-3-Introduction.aspx
for the validation attributes, you can start from this one :
http://msdn.microsoft.com/en-us/magazine/ee335695.aspx
there are also a few commercially available, mainly from Telerik or ComponentOne.
Hope this helps
Upvotes: 1