Hidden secrets of LightSwitch Screen Contents!
So you think you know your screens, what is the point of this post? No, seriously, look again real close. Notice anything… odd, out of place, you should. Test your powers of observation and be more inquisitive. Do you have a LightSwitch Rich Client application? If so you had better read on…
This article is part of a series of posts from Xpert360 Development Team to address real world scenarios and problems faced when designing, creating and implementing Visual Studio LightSwitch applications. Brought to you by the original and genuine Power Tools for Visual Studio LightSwitch!
Let us start by looking at a Contoso based LightSwitch application. Here it is looking rather fetching in its Jetpack-style theme.
Could this simple screen be hiding any secrets? You would think not. Hats off to you if you do know the hidden secret behind this home screen. Here it is again in screen designer.
Look closer. No, the secret is not the globalised labels. In fact we cannot see the hidden secret in the above screen shot. We need to take a different view.
If you use AIDE for LightSwitch Explorer or Screen Workbench you can obtain a list of the screen contents. In the above example I have exported the list to Excel and marked up the content for easier viewing.
Look closely at the screen content items and match them up with the designer view. Hidden underneath the RowTemplate item we have 15 other items that correspond to the properties of the Appointment entity.
These screen items are expected, they seem kind of plausible, they are necessary to the functioning of the screen. Is any of this statement correct? Err… No! Take a look at this modified set of screen contents taken from AIDE Screen Workbench.
With these screen contents the resulting Home screen appearance is the same as before. Really it is, it works fine. It did not need the hidden items. I use the LightSwitch Exchange Hub for quick backup and restore and in this case it shows the real size difference in the Home screen metadata.
Then looking at the before and after Home screen metadata backup-ups.
So this simple Home screen’s metadata has shrunk from 19KB to 11KB. You may be asking yourself, did I edit the Client.lsml file, well did I?
Until next time…
Try them and support your LightSwitch tooling ISVs.
Also, do participate in forums and vote on your desired AIDE features. Help us to help you by prioritising the features in the product roadmap. VS2013, check! Export/Import entities and settings, check! Do you want to shape data to exclude columns? How about a localization workbench? Optimization workbench? Update metadata in bulk? That is a flavour of a few forthcoming features and ideas, we always keep a few things secret to surprise you!
Company information: Xpert360 Ltd, founded in 2009, is an Independent Software Vendor and Custom Solution Provider based in the United Kingdom.
“Xpert360 Lightning” and “AIDE for LightSwitch” are trademarks of Xpert360 Ltd, copyright 2013.