Add and Edit Text in LightSwitch 2012

Here we will see how to add text on a Screen using LightSwitch Visual Studio 2012.

The following is the procedure for adding text on a Screen.

Step 1

Open the LightSwitch Application in Visual Studio 2012 and go to the Solution Explorer.

sol exp8.jpg

Right-click on Data Sources and choose "Add Table".

add table8.jpg

The table appears in the table designer window. Insert the records in the following table.

person table.jpg

Step 2

Now once again go to the Solution Explorer, right-click on Screens and choose "Add Screen".

add src8.jpg

The Add New Screen dialog box appears. Select the "Editable Grid Screen" from the Screen Template, under screen information, choose "Person" under screen data and provide a name to the Screen and click the "OK" button.

add new src.jpg

The Screen Designer appears as shown below.

src desi.jpg

Step 3

Press F5 to run the application. Add a new item to the list.

out.jpg

Step 4

Stop debugging the application.Once again go to the Screen Designer, under the data grid click on "Add", a drop down list will appear.

Add text.jpg

Select "Add Text" from the drop down list.

text.jpg

We will notice that the Edit text dialog box will appear on the Screen. In the dialog box enter the text that you want to display on the screen and click "OK" to accept the text.

Edit Text.jpg

Step 5

Now, if you want to do some editing in the text then go to the property window; there is an "Edit Text" hyperlink in the Appearance section.

prop win8.jpg

Once again press F5 to run the application. Note that the text will be added to the footer section of the Screen.

output.jpg

Up Next
    Ebook Download
    View all
    Learn
    View all