Alessandro Del Sole's Blog

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

My Links


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


Post Categories

.NET Framework


Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

gennaio 2012 Blog Posts

Windows Phone: listing and playing videos from YouTube (Visual Basic)

I am building an'app for Windows Phone 7.5 where I needed to show a list of videos from a YouTube channel, listing videos inside a ListBox and then allowing users to play the selected video. I never did this before, so I found an interesting article on Visual Studio Magazine that put me on the right direction and that I adapted to my needs (not least writing code in Visual Basic ). The first thing you need to do is constructing the Web address of the feed containing the desired list of videos. There is a number of URIs according to what you...

posted @ venerdì 20 gennaio 2012 23:04 | Feedback (0) | Filed Under [ Visual Basic Silverlight/Windows Phone ]

Windows Phone: protecting confidential data (Visual Basic)

Protecting user's confidential information is so important and it becomes even more when developing apps for mobile devices. When you create applications for Windows Phone you can still use existing skills related to the System.Security.Cryptography namespace of the .NET Framework, and one existing technique offers a simplified way to protect information via encryption. There is a class called ProtectedData which exposes two shared methods, Protect and Unprotect. The first method receives a string and returns its content under the form of an encrypted array of byte. The second method receives the encrypted array and returns the original, unprotected string. That said, let's see how to...

posted @ venerdì 20 gennaio 2012 22:39 | Feedback (0) | Filed Under [ Visual Basic Silverlight/Windows Phone ]

Windows Phone: saving pictures from the Web to the Pictures hub (Visual Basic)

The development platform for Windows Phone offers a number of APIs to interact with the Pictures Hub, which is the place where pictures are stored. A very frequently asked question is how to save pictures to the Hub, given their Web address. This first assumes you have permissions to do so . To accomplish this we first use the WebClient class to make an asynchronous download of the picture; next, we move the picture's content (which is an array of byte) into a file inside the isolated storage; finally, we move the picture to the Hub. The quickest way to interact with the...

posted @ venerdì 20 gennaio 2012 22:26 | Feedback (0) | Filed Under [ Visual Basic Silverlight/Windows Phone ]

Entity Framework: solving the "New transaction is not allowed because there are other threads running in the session" exception

It is not unusual to perform a For..Each loop over an entity set based on the ADO.NET Entity Framework. Something like this: For Each animal In MyModel.Animals 'Do something here... Next In the sample above the Animals entity set is of type ObjectSet(Of T), and of course T is a dummy Animal type. If you loop directly an ObjectSet(Of T) then the EF might return the following exception: "New transaction is not allowed because there are other threads running in the session". In order to solve this problem you must avoid performing the loop directly against the ObjectSet, which also means using something like the AsQueryable or ToList...

posted @ venerdì 20 gennaio 2012 22:19 | Feedback (0) | Filed Under [ Visual Basic ]

My new article on MSDN: Local Data Access in Windows Phone Mango

Today a new article of mine has been published on the Visual Basic Community contents page of the Visual Studio Developer Center (formerly known as Visual Basic Developer Center). The article's title is Local Data Access in Windows Phone Mango and it describes how to take advantage of SQL Server Compact Edition 3.5 in your apps to increase your productivity by storing data into a true database. Enjoy! Alessandro

posted @ lunedì 9 gennaio 2012 21:40 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Silverlight/Windows Phone ]

Invoking Bing Maps in Windows Phone Mango

One of the new interesting possibilities introduced by Mango in the Windows Phone development is invoking Bing Maps under the form of a Launcher object. Launchers are exposed by the Microsoft.Phone.Tasks namespace and allow activating device features, in this particular case the maps service by passing the desired search term. Invoking Bing Maps in code is very simple. The following snippet demonstrates how to start Bing Maps passing the desired address to the SearchTerm property of the BingMapsTask object. Such a task is then launched via a method called Show: Dim bingTask As New Microsoft.Phone.Tasks.BingMapsTask ...

posted @ lunedì 2 gennaio 2012 00:33 | Feedback (0) | Filed Under [ Visual Basic Silverlight/Windows Phone ]

Powered by:
Powered By Subtext Powered By ASP.NET