Hello Silverlight Community, I am the product manager for Microsoft® Visual Studio® LightSwitch™. Today, we are making Visual Studio LightSwitch Beta 2 publicly available for download. If you are new to Visual Studio LightSwitch Beta 2 here are some resources to get you started:
- What’s new in Visual Studio LightSwitch Beta 2
- Visual Studio LightSwitch Tutorial on creating applications (Jason Zander’s Post)
Visual Studio LightSwitch Extension Overview
For this blog post I am going to focus on extensions for Visual Studio LightSwitch applications and show you an example of how they are used. Extensions provide additional functionality that is not standard in the product. For example, adding a unique screen template that did not ship in the box. Silverlight is one of the technologies used in developing extensions. There are 6 extension points.
- Business Type – is a refinement of a data type that provides formatting, validation and visualization.
- Control – is the building block of extensions and is what users interact with.
- Custom Data Source – provides connectivity to other data sources via a WCF RIA Service.
- Screen Template – is a stencil for the layout of how controls are to be displayed at run-time.
- Shell – provides the common look and feel of an application.
- Theme – is the color and font palette.
Extending Applications with Extensions
Once an application is developed it can be extended with minimal changes. You will notice below that I have a completed LightSwitch sample application for a sales person. Although it is complete there are a few changes that I would like to make. Primarily I would like to change the address to display a map and I don’t like the fact that the full payment instrument is exposed (a major mistake).
The first thing we are going to change is the address to a map. Instead of redesigning our application to support a map, we will change the control that is used for displaying the address. It is currently set to a label but we will change that to the Bing Map Control.
With the address now set to the Bing Map Control I will add my Bing Maps Key to access the service.
I will also follow a similar process for the billing information, choosing the Mask Edit Textbox Control. With these changes I’ll start my application again.
You can see that by using extensions I was able to update my application even though I did not redesign it. The final thing I am going to do is change the look and feel of my application using shells. From my applications properties I can change my shell by selecting a new one from the drop down menu.
My application updates are now complete. Press F5 to run the application and it is using the new shell. The shell I am using includes a lot of features that was not available in my standard shell. Instead of focusing on the functionality I will show you how my application now appears compared to its previous view.
Developer Marketing, Microsoft Corporation