How to: Modify a Silverlight Screen by Using Code

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

Visual Studio LightSwitch enables you to accomplish many screen-related design tasks by using designers and tool windows. However, there are certain tasks that you might want to accomplish by using code. This topic shows you how to accomplish a set of common screen-related design tasks by using the screen object model. For more information about where you can write code in your application, see any of the following topics:

The following list describes some common data-related tasks that you accomplish by using the screen object model.

You can hide or show controls on a screen by using code. You can also specify whether controls are read-only or disabled.

The following example hides a company name in a data grid if the company name is Great Lakes Food Market. This example also makes the control read-only so that viewers cannot modify the company name by typing text into the control.

No code example is currently available or this language may not be supported.

The following example hides the company name in a details view on the screen if the company name of the selected item is Great Lakes Food Market. This example also disables the Delete button so that users cannot delete a customer who works for Great Lakes Food Market.

No code example is currently available or this language may not be supported.

Screens: The User Interface of Your LightSwitch Application
How to: Handle Silverlight Screen Events
Performing Data-Related Tasks by Using Code

Show: