How to: Create a Dialog or Popup for a Mobile Client of a LightSwitch App
If you create a dialog or a popup for your LightSwitch app, users can display or specify information on a phone, tablet, or other mobile device that's running a client for that app.
When a dialog appears, users must tap its OK or Cancel button to close it. You can create multiple dialogs for any screen and share the same dialog between screens.
A popup temporarily appears on top of a screen, and users close a popup by tapping anywhere outside it. You can create multiple popups for any screen, but you can’t share them between screens.
To create a dialog
In Solution Explorer, open the HTML client screen for which you want to create a dialog.
In the center pane of the screen designer, open the shortcut menu for the Command Bar node, and then choose Add Button.
In the Add Button dialog box, choose the Choose an existing item option button.
In the showPopup list, choose edit to create an Add/Edit Details screen, or choose view to create a View Contacts screen.
In the Navigate to list, choose New Screen, and then choose the OK button.
In the Add New Screen dialog box, give the dialog a useful name, and specify the screen data and additional data to include.
See How to: Create an HTML Client Screen.
You can add data and design the dialog as you would any other screen. See How to: Design an HTML Screen by Using the Screen Designer.
To show an existing screen as a dialog
In Solution Explorer, open the HTML client screen that you want to show as a dialog.
In the center pane of the screen designer, choose the top level node.
In the Properties window, select the Show As Dialog check box.
To create a popup
In Solution Explorer, open the HTML client screen for which you want to create a popup.
In the center pane of the screen designer, open the shortcut menu for the Popups node, and then choose Add Popup.
In the Properties window, give the popup a useful name.
You can add data and design the popup as you would any other screen. See How to: Design an HTML Screen by Using the Screen Designer.
See Also
Tasks
How to: Design an HTML Screen by Using the Screen Designer