MultiLine TextBox in LightSwitch 2012

Here we will see how to create a Multiline TextBox in a LightSwitch Application (Visual C#) in Visual Studio 2012.

The following is the procedure for creating a multiline TextBox.

Step 1

Open the Solution Explorer.

sol ex.jpg

Step 2


In the Solution Explorer, right-click on the Screens and choose "Add Screen".

Add src.jpg

Step 3

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

new.jpg

Step 4

The Application Designer appears.

app desi.jpg

Step 5

Under Application Designer, go to the menu bar and select "Add Data Item".

Add data item.jpg

Step 6

The Add Data Item dialog box appears on the screen. Select the Local Property radio button and
select the "String from Type" drop down, enter the name as "Multiple Line Note" and click "Ok".

local prop.jpg

We will see that the Data Item is added to the left hand side of the Screen.

Multiline prop added.jpg

Step 7

Now drag the Data Item onto the Screen.

drag.jpg

Click on the Data Item (TextBox) and go to the property Window and click on the "Lines" radio button and enter the number of lines.

Add lines.jpg

Step 8

Press F5 to run the application. 

output.jpg

Up Next
    Ebook Download
    View all
    Learn
    View all