Menu

View builder

Help
gyry
2008-11-21
2013-04-26
  • gyry

    gyry - 2008-11-21

    Hi,

    I plan to increase reusability of my UI components so I would like to have a generic form as a template for many views, additionally there will be several user controls with specific ui elements to be added to the template form, e.g. user controls with different grid for each data view.

    My idea is to create a task for each such a form (e.g. CustomerTask), the task would contain a interaction point for a generic template form and some interaction points for user controls. Than, in a task start event I'd create controllers and views for user controls, and then attach them to the form template.

    Another approach would be to have a custom ViewsManager that in a form creation process would add user controls (e.g. by IoC).

    Any advise on that?

    Roman.

     
    • OVZH

      OVZH - 2008-11-22

      Hi again Roman,

      All you need here is just to create child user control views and add them to the form before the form gets initialized (for example in the form's constructor). Then during the form initialization all child user control views will be registered and linked to controllers.

      Examine the WindowsFormsExample project: there the child user control views were placed on the form at design-time (during form constuction). And in the runtime they are successfully registered and initialized by the framework.

      Does this fit your needs?

      Regards,
      --
      Oleg Zhukov

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.