Articles → LIGHT SWITCH 2011 → Modal Popup In Lightswitch 2011
Modal Popup In Lightswitch 2011
Software Requirement
- Visual studio 2010 is installed on your machine.
- Visual Studio 2010 service pack 1 is installed on your machine.
- Microsoft Visual Studio Light switch 2011 is installed on your machine.
Prerequisite Knowledge
- How to create lightswitch screens?
- How to add button(s) in lightswitch screens?
- What is button’s execute method?
- How to add data item in the screen?
Creation Of A New Screen
Click to Enlarge
Add Modal Popup
- Add row layout in the screen
- Change row layout to modal popup
- Add data item
- Add close button on modal window
- Click on the add button.
- A dropdown appears. Select New Group.
- A Rows Layout will be added in the screen.
Click to Enlarge
- Click on the arrow besides Row Layout.
- A drop down appears. Select Modal Window from the drop down.
Click to Enlarge
- Add data item (Local Property).
- Set its name as HelloMessage.
- Drag data item on the screen.
Click to Enlarge
- After you drag data item on the screen, change the control type from textbox to label.
Click to Enlarge
Click to Enlarge
partial void btnClose_Execute() {
// Write your code here.
this.CloseModalWindow("Group");
}
Add A Button To Open Modal Popup
Click to Enlarge
partial void btnOpen_Execute() {
// Write your code here.
this.HelloMessage = "Hello";
this.OpenModalWindow("Group");
}
Output
Click to Enlarge
Download