This article describes how to use Image Datatype in LightSwitch Visual Studio 2012.
Here we will see how to use the Image Datatype in LightSwitch Visual Studio 2012.The following is the procedure for using an Image data type on a screen.Step 1Open the LightSwitch Application in Visual Studio 2012 and go to the Solution Explorer.Right-click on Data Sources and choose "Add Table".The table appears in the table designer window. Insert the records in the following table.Here in the table I have added a record named "Photo" and I have taken its datatype as "Image" as shown below.Step 2Now once again go to the Solution Explorer, right-click on Screens and choose "Add Screen".The Add New Screen dialog box appears. Select the "Editable Grid Screen" from the Screen Template, inside the screen information, choose "Student" under screen data and provide some name to the Screen and click the "OK" button.The Screen Designer appears. Then click on Photo under the Data Grid Row, and go to the property window and choose the Label Position.Step 3Press F5 to run the application. Click on the Add Button (+). The Add New Student dialog box will appear. Provide the information. In order to an add image, click on the Load Image button (->). An Open Dialog Box will appear. Select the image and click the "OK" button. Step 4Stop debugging the application.Once again go to the Property window of "Photo" in the screen designer. We select the Label Position to "None" and select the Stretch property from the property window. Step 5Once again press F5 to run the application.
Printing in C# Made Easy