Tuesday 22 September 2015

Copy Screens In LightSwitch using XML Editor

I was working on LightSwitch application and came across with an issue to copy screen. Then I tried a way to copy the screen using XML Editor. As LightSwitch screens can be edited in XML only. Here are the steps that we can follow and copy screens easily.  

Step 1: Create a with extension Copy of your screen. (e.g you want to copy Home.lsml screen then create new screen with name HomeCopy.lsml) It does not matter which template you are using. 

Step 2: Open the Home.lsml screen in XML Editor and copy all content. 

Step 3: Use the same way to open the HomeCopy.lsml screen in XML Editor and paste all the content form Home Screen. Then find and replace Home with HomeCopy keyword. 

Step 4: Apply the same way to copy the CS file code for corresponding file. CS file can be open as it is and copy the content from Home.lsml.cs to HomeCopy.lsml.cs and replace the name of all screen methods with HomeCopy. 

Thanks........

No comments: