5. Introduction to composite UI Application Block (CAB) Workspace

Source: Internet
Author: User

Through the previous introduction, we can know thatMainThe method is inherited fromFormshellapplicationObject instances can perform initialization of many frameworks, such as loading modules and loading services. SlaveFormshellapplicationType Definition:

Public abstract class formshellapplication <tworkitem, tshell>:Windowsformsapplication<Tworkitem, tshell> where tworkitem:WorkitemWhere tshell: Form

We can see that two types of parameters are required, one isWorkitem, One isForm,FormshellapplicationThe two types are instantiated during initialization. AndFormType instanceShow. HereFormThe type of instance is our applicationProgram.

The main interface is the main interaction area between the user and the system. It serves as a container and carries other business interfaces.

CabProvidedWorkspaceComponent, which acts as a user control andSmartpartDisplay container of the control, which can display the business interface in a variety of unified display modes. That is to sayWorkspaceUser Controls can be displayed in different styles.WorkspaceAllows you to display, hide, activate, and disable user controls. Of course, cab currently provides several default display styles. Next we will introduce them one by one. If developers think these display styles are not enough, they can also expand them on their own.

All typesWorkspaceAll Implemented interfacesIworkspace.

CurrentlyCabProvidedWorkspaceInclude:

Windowworkspace

Mdiworkspace

Tabworkspace

Deckworkspace

Zoneworkspace

Next, let's talk about each type.WorkspaceFeatures:

1. windowworkspace

TheWorkspaceThe user control that you need to display in oneWinformAndWorkspaceCorrespondingWindowsmartpartinfoTo set the Display Properties of the user control, such as the title information and whether it is a mode window.

2. mdiworkspace

TheWorkspaceYesWindowworkspaceDeveloped on the basis of, he also put a user control in a separateFormAndMDITo display and manage its subforms. The corresponding user control display information is set throughSmartpartinfoAnd then passed in as a parameterWorkspaceOfShowMethod.

3. tabworkspace

TheWorkspaceYou can useTabPage, we canWorkspaceCorrespondingTabsmartpartinfoTo set the Display Properties of the user control, such as the title information.

4. deckworkspace

TheWorkspaceThe user control is displayed in a format similar to overlapping cards. The current active interface is located at the top of the card. The number order of cards is fromWorkspace. NoneWorkspaceCorrespondingSmartpartinfo.

5. zoneworkspace

TheWorkspaceThe user control will be displayed in a tiled manner, suchOutlookYou can divide one interface into multipleZone, EachZoneIs used as a container to render user controls. Similarly, we can setZonesmartpartinfoTo set the user control inWorkspace.

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.