4

I need to create an utility where user can create their own data entry screen. The user should be able to drag and drop normal UI controls (TextBox, RadioButton, CheckBox, ListBox, ComboBox and Image) to any container and arrange them to fit their need. The user must be able to change the background and default values (for TextBox, ComboBox, etc). There should be an option to save the designed screen in either XML/XAML to be used for dynamic UI Creation.

Any suggestions on how to approach this scenario are greatly appreciated.

Mitch
  • 21,223
  • 6
  • 63
  • 86
Kishore Kumar
  • 21,449
  • 13
  • 81
  • 113

2 Answers2

4

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.

Community
  • 1
  • 1
this. __curious_geek
  • 42,787
  • 22
  • 113
  • 137
  • DesignSurface looks a good option but I am not sure about its look and feel. Is there a different version for WPF? – akjoshi Jul 19 '10 at 09:38
  • 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 Jul 19 '10 at 09:47
2

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
  • 15,374
  • 13
  • 103
  • 121