Degree (°) Custom Format Specifier in LightSwitch 2012

Here we will see how to use the Degree (°) Custom Format Specifier in LightSwitch Visual Studio 2012.

In order to get the Degree symbol from the keyboard,
go to your Accessories or simply click "Start" --> "Run" then enter "charmap" and hit Enter. By doing this you will get all the symbols.

Use the following procedure to create a sample showing how to use the Section Separator delimiter on a Screen .

Step 1

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

Solution Explorer

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

Add Table

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

Student Table

Step 2

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

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.

Add New Screen

The Screen Designer appears as shown below.

Application Designer

Step 3

Press F5 to run the application. Provide the information. 

output of editable grid screen

Step 4

Now stop debugging the application. From the Table Designer select the "BodyTemperature" record as shown in the figure below.

Select BodyTemperature from Student Table

Then go to the Format Pattern of Property window in the table designer and enter (#°) in the format pattern as shown below.

Degree in Format pattern properties

Press F5 to run the application. 

Output in Degree