Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links

News

Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories

Archives

Post Categories

.NET Framework

Blogroll

Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

Visual Studio LightSwitch

Text animation in LightSwitch

As you might know, in LightSwitch 2012 you can now add text labels that are not data-bound, which is something you could not do in the previous version except if using some tricks. So you basically select the Add Text command in a screen: Then you specify the text to be displayed: Such a label is shown as Normal text but in the properties you can change this behavior by selecting a different formatting such as Warning, Note, etc. Behind the scenes it is a TextBlock control from Silverlight, so you can definitely create nice animations so that your text message is more appealing,...

posted @ venerdì 12 ottobre 2012 12:57 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

LightSwitch: a small guide for migrating apps from v1 to v2

I have been recently busy in migrating a quite complex LightSwitch application from v1 (2011) to v2 (2012) and so I'd like to share some considerations that can be useful before you start the migration process. Actually, the process is very simple but requires you to pay attention against the following situations. Extensions and 3rd party components If your application uses extensions or controls by 3rd party producers, it is particularly important to ensure that a version supported by Visual Studio 2012 exists. In most cases, extensions for v1 are also correctly recognized and used in v2, but this is not a rule. So,...

posted @ giovedì 11 ottobre 2012 11:47 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

LightSwitch: reading threads from StackOverflow with OData

As you might know, one of the most important new features in the next version of Visual Studio LightSwitch, currently in beta, is the support for OData. You can read some post from Beth Massi about this topic, today I'm just showing a different usage. OData is an open protocol based on WCF Data Services and allows managing data sets through services. If you visit the Ecosystem page of the OData portal, you can find a list of public services from 3rd party producers, including the well-known StackOverflow web site, which offers a very popular forum platform. Imagine you want to read your favorite threads from StackOverflow inside a LightSwitch...

posted @ lunedì 26 marzo 2012 23:22 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

Advanced LightSwitch: passing initialization information to custom data sources (with Visual Basic)

When you build WCF RIA Services for Silverlight you can pass initialization information to the service, so that you can initialize fields or properties or any other members required by the same service. When you have to create custom data source extensions for LightSwitch you still use WCF RIA Services but in a way that is a little bit difference according to some LightSwitch specific requirements. This also means that it is different the way you pass startup information to the service. Actually you can use the connection string, which is not limited to that piece of information that you would normally use to connect to...

posted @ mercoledì 21 dicembre 2011 18:40 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

LightSwitch: solving the error "an object or column name is missing or empty"

If you deploy a LightSwitch application as a Desktop client with local services (2-tier) and you decide to generate a SQL script for creating a database later, it might happen that you encounter the following error when running the script from SQL Server Management Studio: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as “” or [] are not allowed. Add a name or single space as the alias name. Don't be afraid if this happens. Go to the Query menu, then click SQLCMD Mode. Thi...

posted @ venerdì 9 dicembre 2011 11:14 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

LightSwitch: increasing the client-side timeout in code (VB)

There are scenarios in which you need to send a large number of records to a database in LightSwitch or retrieve a large number of records. If the operation becomes too long, this might result in a fault due to a timeout exception. This typically happens if your data source is on a server or on a machine different than yours. Solving timeout problems in LightSwitch can be done in several ways, some on the server side (as you would do in WCF RIA Services), but also on the client side. This requires making an edit to the Application.vb/cs file,...

posted @ venerdì 9 dicembre 2011 11:10 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

My new video: using Visual Studio LightSwitch with MySQL

One of the most frequently asked questions in the LightSwitch developer community is: how can I use LightSwitch with MySQL databases? So I decided to try myself (since I only work with SQL Server) and this video explains what tools you need to reach the goal and how you can connect to MySQL databases and work with data in LightSwitch. There's just a couple of code snippets (yeah, VB!) that you need to write. You can easily enable the full screen view or show the offline player:   > Enjoy! Alessandro

posted @ domenica 13 novembre 2011 00:14 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

My new video: starting migrating an Access database to Visual Studio LightSwitch

Today I have recorded a new video in which I show how to use the SQL Server Migration Assistant for Access in order to start migrating a Microsoft Access database to SQL Server that you can later use in Microsoft Visual Studio LightSwitch 2011 as an external data source. Please note that the video explains a migration of tables and queries, but no VBA code is migrated to Visual Basic or C#. The reason is simply that it is not possible covering any possible code snippet but I think it is useful to have a starting point to begin migrating a...

posted @ venerdì 14 ottobre 2011 00:40 | Feedback (0) | Filed Under [ Visual Basic Silverlight/Windows Phone Visual Studio LightSwitch ]

Advanced LightSwitch: calling built-in search from Silverlight controls (Visual Basic)

I'm migrating a big Silverlight 4 project to LightSwitch and I'm at a point in which I need to implement search screens and editable grids. My requirement was using the RadGridView control from Telerik, replacing the built-in DataGrid of LightSwitch. This implies creating a custom control. If you want to see an example, you can see my previous post about using the Telerik RadGridView in LightSwitch. The problem is that when you implement a custom control you also lose the built-in search box and data paging control, which are offered by search screens. So my goal was implementing search in a...

posted @ mercoledì 21 settembre 2011 00:54 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

My upcoming Webinar on Visual Studio LightSwitch with Visual Basic

On October 4th I will deliver an online session entitled Building Business Applications with Visual Studio LightSwitch 2011. This is an entry-level Webinar hosted and promoted by DevExpress, one of the most important Microsoft partners from the developer point of view, and manufacturer of the XtraReports for LightSwitch extension. It will be an opportunity to show LightSwitch to who has never seen it in action, but also an opportunity to receive your questions about the product. It is scheduled for Oct. 4Th, at 10 a.m. PST. Registration is required at this address, whereas the complete list of webinars that DevExpress is offering is available at this...

posted @ mercoledì 14 settembre 2011 15:06 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

Visual Studio LightSwitch Unleashed - where are we?

I know that some of you already preordered my upcoming book Visual Studio LightSwitch Unleashed, so I woud like to keep you informed on the work progress. We (me and my  technical editor) have decided to reorganize the table of contents, so that the book has a more logical approach. We did not remove anything, we just changed how it is organized. Basically now the book is made of two main parts, which make easier for the target audience to approach the book. The first part is dedicated to the LightSwitch developer and discusses the so-called "coding optional" features and that...

posted @ lunedì 22 agosto 2011 16:56 | Feedback (0) | Filed Under [ Visual Studio LightSwitch ]

How-to: get the "Powered by Windows Azure" logo for your LightSwitch applications

Some time ago Microsoft launched the new Microsoft Platform Ready portal, where you can certify your applications based on a number of recent technologies from Microsoft, including Windows Azure. As you know, LightSwitch applications can be easily deployed to Windows Azure and in this scenario they use SQL Azure databases. The MPR program enables certifying applications relying on both technologies, so you can certify your LightSwitch applications running on the Cloud. So let's try and see how to accomplish this. First, you just need to create a LightSwitch application with at least one table and one screen, no matter how complex...

posted @ venerdì 27 maggio 2011 21:14 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

Visual Studio LightSwitch: acquiring images from devices with Visual Basic and the WIA APIs

Visual Studio LightSwitch is an extensible environment and is based upon Silverlight 4. The combination of these two factors allows creating a lot of additional stuff so that you can provide features that are not available by default. Today the goal is understanding how to use COM Automation in Silverlight 4 to acquire images (and possibly documents) from scanners in a LightSwitch application. Before going on, it is worth mentioning that COM Automation requires elevated privileges so this means that the application must run as a desktop client (out-of-browser). So let's create a new LightSwitch project. I will show some Visual Basic code but translating...

posted @ domenica 22 maggio 2011 18:29 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

Using Telerik controls in LightSwitch for exporting, filtering, and sorting data - part 2

In the previous post we saw how to create a Silverlight user control that embeds some controls from the RadControl for Silverlight by Telerik, to be used in LightSwitch applications. Basically we created the control, replaced the built-in DataGrid in LightSwitch, performed the data-binding and we have seen how this perfectly works. We also prepared some buttons for printing and exporting features, which will be implemented in this post. But we'll do more: we'll demonstrate that the previously created custom control is also reusable. Let's start from this point, and add a new screen of type EditableGrid pointing to the Orders collection: Once the Screen Designer...

posted @ giovedì 19 maggio 2011 13:19 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

Using Telerik controls in LightSwitch for exporting, filtering, and sorting data - part 1

One of the hottest topics for those folks that are evaluating the Betas of Visual Studio LightSwitch is the possibility of using 3rd party user controls, but also printing and reporting. Of course you have the possibility of doing that, by using user controls written upon Silverligh 4.0. I intensively use the RadControls for Silverlight di Telerik suite, which is very good and that enriches the Visual Studio 2010's toolbox. It seems that Telerik is planning to create extensions for LightSwitch, but you can actually use controls from the current suite. In this (and the next) blog post we'll see how...

posted @ giovedì 19 maggio 2011 13:02 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

Visual Studio LightSwitch: binding a Silverlight Pie Chart control to screens

As you know, it is easy to extend the user interface of screens in LightSwitch applications by adding custom Silverlight controls. The Silverlight Toolkit adds to your toolbox a number of new useful controls, especially for data visualization such as charts. In this post I will show you how to add a Pie Chart to a screen listing products.Imagine you have an entity named Product, like the following which I grabbed from the Northwind database: Once you have this entity, imagine you also have a Search Screen pointing to the Products collection. Since the list of products is quite long, we...

posted @ venerdì 26 novembre 2010 18:25 | Feedback (0) | Filed Under [ Visual Basic Silverlight/Windows Phone Visual Studio LightSwitch ]

Visual Studio LightSwitch: connecting to SQL Azure databases

Among the available data sources that Visual Studio LightSwitch allows connecting to, since the current beta, we can find SQL Azure databases. SQL Azure is the database "on the cloud" of the Windows Azure Services Platform. The cool thing is that once you have your database on SQL Azure, the way you connect to it does not change. Once LightSwitch is running, click "Attach to an external database". Next select Database as the data source:   Next you have to specify connection parameters such as the SQL Azure server name, user name and password (you work with SQL authentication) and, of course, the database name: In my case...

posted @ domenica 21 novembre 2010 11:37 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Windows Azure Visual Studio LightSwitch ]

Visual Studio LightSwitch: implementing and using extension methods with Visual Basic

As you know Visual Studio LightSwitch allows building business applications quickly and easily with an approach of type Data + Screens = Business Applications. This approach simplifies a lot the application development, even for developers who are new to programming, but necessarily requires some restrictions on customizing some application parts. In reality, LightSwitch applications are 100% .NET applications running on the Silverlight 4 platform, meaning that you can reuse a lot of your existing skills about .NET and managed languages, such as extension methods. For example, imagine you have a simple entity named Contact which exposes a property called WebSite of type String, which stores the contact's web site...

posted @ giovedì 4 novembre 2010 12:08 | Feedback (0) | Filed Under [ Visual Basic Visual Studio LightSwitch ]

Rapid application development with Visual Studio LightSwitch

Probably many of you already know that recently Microsoft announced the first beta of a new product in the Visual Studio family, called Visual Studio LightSwitch that is publicly available since August 23rd. In this blog post I'm going to make an overview of LightSwitch with a few words and some pictures. What Visual Studio LightSwitch Is (and my personal thought for VB 6 developers) Visual Studio LightSwitch is an integrated development environment for rapidly developing Line Of Business Applications. Rapid because the pipeline is: "I create my data -> I define my screens -> LightSwitch prepares the infrastructure -> I just press F5...

posted @ mercoledì 25 agosto 2010 16:20 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Silverlight/Windows Phone Visual Studio LightSwitch ]

Powered by:
Powered By Subtext Powered By ASP.NET