Udostępnij za pośrednictwem


Step 3: Create a Screen

In this lesson, you will create a screen to enter, display, and change data in your contact management application. You will use the LightSwitch Add New Screen dialog box to select a screen template and specify the data to display.

Create a Screen

To create a screen for your application

  1. In Solution Explorer, click the Screens node.

  2. On the Project menu, click Add Screen.

    The Add New Screen dialog box appears.

  3. In the Select a screen template list, click Editable Grid Screen.

  4. In the Screen Name field, type ContactList.

  5. In the Screen Data drop-down list, select Contacts, and then click OK.

    The Screen Designer opens and displays a representation of the layout and commands for the screen as shown in the following illustration:

    The screen layout

Closer Look

You just created a screen that displays your contact data in a grid that you can edit. For this application, the default settings are appropriate, but you usually customize the screen in the Screen Designer. For example, you can hide an ID field, make a field read-only, or change the layout of some data.

Although you cannot see how the screen looks in the Screen Designer, you can run the application to see the screen. You can even make changes to the screen in the running application. This is covered in a later lesson.

Next Steps

In the next lesson, you will run your application and test its capabilities.

Next lesson: Step 4: Run and Test the Application

See Also

Tasks

How to: Customize a Screen in a Running Application

Concepts

Step 2: Define the Data

Other Resources

Creating Your First LightSwitch Application

Screens: The User Interface of Your Application