tags:

views:

48

answers:

2

I need to create an utility where user can create there own data entry screen. There should be an option to Drag and Drop normal UI controls (Textbox,TextBox,Radio Button, CheckBox, ListBox, Combobox and Image) to any container and arrange them depends on the user. Inface the use can change the background and default value for the TextBox,Combo etc. After this there should be an option to save the details in either XML/XAML and used for the dynaimc UI Creation.

How to approach this synario and any suggestion is greatly appreciated.

+2  A: 

What you're asking can be accomplished by the .Net DesignSurface that provides the design-time infrastructure at runtime. We have already done it for WindowsForms and we can design a windows-form at runtime, produce XML of the designed form, create and run the instance of the designed form, all at runtime.

Surprisingly and unfortunately, there's not enough resources available on the internet on utilizing DesignSurface. I came across this Article on code-Project that can really get you started in right direction [This was the best of all I ever found on DesignSurface]. In our case, we have inherited from DesignSurface and implemented our visual-studio like runtime form designing application and it works great.

You can refer to a similar question that I asked in past here.

this. __curious_geek
DesignSurface looks a good option but I am not sure about its look and feel. Is there a different version for WPF?
akjoshi
I have yet not been able to figure out if WPF form-designer is using the same Designtime infrastructure as used by classic-wiondows-forms but I know for sure that Workflow designer uses the same infrastructure and workflow designer works on top of WorkFlowDesignSurface that inherits from DesignSurface.
this. __curious_geek
+1  A: 

I am also working on a similar project and we have used canvas as designer surface; as done in this CodeProject article -

WPF Diagram Designer - Part 4 http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part4.aspx

One more project based on this can be found at codeplex-

http://simulo.codeplex.com/

akjoshi