Dynamic configuration interface in winform Based on dev Control

Source: Internet
Author: User

I have stayed in the blog for more than a year and always wanted to write something, but I don't know anything to share with you every time I write it, because I think others know what I know. I didn't know what to write until I started to bring the project.

Now, I will write my first blog today. The level is limited. I hope you can read more!

Today, I want to share a design scheme of dynamic configuration interface in winform Based on layoutcontrol in devexpress. It is mainly used for dynamic form generation in various scenarios.

I believe that the devexpress control is a powerful interface layout control that should be familiar with layoutcontrol. I also implemented a set of dynamic forms based on this control.

I. Application scenarios

This interface is used for data entry, data display, and query configuration. For example, we have customized a person information card for the user. during initial development, for various reasons, we did not design a field, or the interface display method was not friendly and intuitive, we hope to meet the user's needs by changing the configuration file, without re-configuring the projectCodeGeneration and release reduces the workload of developers.

Of course, if your form is not a change point, we do not recommend using the configuration method to generate the interface.

2. Control Encapsulation

The layoutcontrol encapsulation allows you to dynamically create interfaces based on the configuration information of the configuration file. Because the control comes with the ability to save its layout information, we can focus on more useful aspects in the design. The encapsulated control is named exlayoutcontrol. I also call it a layout control because it is essentially a container.

3. Design Experience

This solution is my third design. It has been implemented in a large number in the project and has obvious effects. In addition, the user is very appreciative of this solution and can be supervised by the user on site, quickly implement the relevant requirements.

In versions 1 and 2, existing controls have been reloaded, and unified interfaces are implemented as the core idea. The advantage is that the caller is relatively simple, but you need to implement a unified interface for all the controls used to use the actual project, the scalability is very poor.

Based on the experience of the first two versions, I realized that the control cannot be implemented in an inherited way, but should be implemented in an object combination.

Such as structure:

The dark background in the figure is the container control, and the controller is used to control the properties and behavior of the control.

I believe you can see this figure and understand the details. The core of these controllers is to use them to manage the attributes and behaviors of each control.

......

After taking a bath, it will be around 11 o'clock. If you don't play it anymore, you will go to bed. Please take the time to complete it later! There are still important things tomorrow!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.