How to: Create Multiple Controls for a Business Type
By default, a LightSwitch business type extension includes a control for displaying the data type on a screen. You can replace the control with a custom LightSwitch control or a set of controls, for example, one control for data that can be modified and a different control for read-only data.
To add a control to a business type extension
In Visual Studio, open the business type extension solution.
In Solution Explorer, select the ProjectName.Lspkg node, where ProjectName is the name of your solution.
On the menu bar, choose Project, Add New Item.
In the Add New Item dialog box, select Control.
In the Name field, enter a name for the control, and then choose the Add button.
The required files for the control are added to the solution in the Client, ClientDesign, Common, and Design projects.
In Solution Explorer, select the ProjectName.Common node, where ProjectName is the name of your solution.
Open the ControlName.lsml file, where ControlName is the name of the control that you added.
In the <Control.SupportedDataTypes> element, add the following code, and then replace BusinessType with the name of your business type.
If you do not want to support the default data type String, then also remove the line <SupportedDataType DataType=”:String”/>.
For information about how to add validation and properties to the control, see Walkthrough: Creating a Business Type Extension. For more information about how to customize the control, see How to: Create a LightSwitch Control