Prologue:My previous article was about how to use images in a LightSwitch application. Now we shall discuss how to add a ModelWindow into the LightSwitch Application.What is Model Window in LightSwitch?A Model Window is basically a kind of window having overall control of when it is fired up to display. We can't touch the other windows without responding to the Model Window.In LightSwitch, if you add a Model Window into your screen, initially it will be displayed as a Button control. On clicking the Button the Model Window will be shown.To demonstrate the Model Window in LightSwitch we will create an application.Preparing the Solution:Start the VS 2010; create a LightSwitch Desktop application with the name "ModelWindowInLSBeta2" as shown in the following figure. Follow the [No: #] to create the Project.Creating Entity for Application:Create a table as shown in the screen by selecting the "create a table" option in the startup screen. Designing the Screen: First of all we need to add a new Data Screen to our demo application. We should know how to add a new Data Screen to a LightSwitch application, prior to proceeding with designing the screen. To know more about how to add a New Data Screen to a LightSwitch Application please read this Article.Now we know how to do the screen stuff. See the following figure which is the default screen layout for the screen we have created. So we have to change this layout of the screen so that the Model Window can be easily explained. Before adding the Model Window we have to prepare the layout. So delete the highlighted fields as shown in the above figure.Adding Model Window into the Screen:After preparing the layout to add a Model Window, just add a new group to the Person Property Rows Layout. After adding the new group, change the default layout to Model Windows as shown in the above figure. Now we have to design the Model Window. Change the MaxWidth of the Model Window button in the Property page so then it won't stretch to the screen. And also change the Label position as None. Add a new Group in to the Model Window.
Address Editor and Address Viewer in LightSwitch Beta 2
How to Install LightSwitch Beta 2 - for Beginners