Static means that something doesn't change. Static text is
text that the user can't change or we can say text that remains constant on every
document is called static text. The type of static text is a label.
Step by step solution
Step 1 : Open Visual Studio
LightSwitch->Right click on screen->Add new screen.
Step 2 : Select list and details
screen->Write screen name (Static text)->Select screen data none->Ok.
Step 3 : Add new group.
Step 4 : Expand rows layout->Select
columns layout.
Step 5 : Add data item->Select local
property->Type (string)->Write name (Text )->Ok.
Step 6 : Move Text from static text
screen to columns layout.
Step 7 : Now go to text
property->Control type (Label)->Label position (None)->Font style (Heading 1).
Step 8 : Go to write code->Select
statictext_InitializeDataWorkspace.
using System;
using
System.Linq;
using System.IO;
using
System.IO.IsolatedStorage;
using
System.Collections.Generic;
using
Microsoft.LightSwitch;
using
Microsoft.LightSwitch.Framework.Client;
using
Microsoft.LightSwitch.Presentation;
using
Microsoft.LightSwitch.Presentation.Extensions;
namespace
LightSwitchApplication
{
public partial
class StaticText
{
partial void
StaticText_InitializeDataWorkspace(List<IDataService>
saveChangesTo)
{
Text = "Welcome in Visual Studio
LightSwitch 2011.......";
}
}
}
Step 9 : Run application (Press F5).