Posts

Showing posts from 2011

Silverlight 5 P-Invoke: Using Kinect SDK from Silverlight

Image
Away from all the discussions about whether Silverlight is dead or not, The Silverlight 5 RC contains the previously announced P-Invoke feature which enables you to call Win32 style APIs from a trusted Silverlight application. There are some attempts to use Kinect from Silverlight ( here ) but this was before MS released the official SDK. we will use Silverlight 5 P-Invoke feature to call the Kinect SDK APIs. P-Invoke in Silverlight works just like P-Invoke on the desktop. you use the DllImport attribute to import the APIs and you declare in your code the dependent types (Enums, structs, etc.) [ DllImport ( "MSRKINECTNUI.DLL" )]        private static extern HRESULT NuiInitialize( uint dwFlags); I tried to keep the classes and methods in library identical to the ones in the official SDK. I implemented only a couple of the available APIs (with the help of the Coding4Fun Kinect Toolkit and Reflector). To test the library we will create a simple applicati

Surface 2.0 SDK Released

Image
The long awaited Surface 2.0 SDK has been just released. to get started go to the new Surface Developer Center and download the SDK. Once downloaded and installed, start VS2010, you will find the Surface 2.0 project templates available Let’s create a sample application, I will create a simple twitter client (hopefully before scottgu creates it) let’s name it TwittSurf Once we created the project you will have the same project structure as you have in the Surface 1.0 version, let’s create our UI < s : SurfaceWindow x : Class ="TwittSurf.SurfaceWindow1"     xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns : x ="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns : s ="http://schemas.microsoft.com/surface/2008"     Title ="TwittSurf"     Loaded ="SurfaceWindow_Loaded" >      < Grid >          < s : ScatterView >                  < s : ScatterViewItem

Portable Library Tools

Image
With the introduction of Windows Phone 7.0 a new opportunity emerged for Silverlight developers, this new platform uses Silverlight (a version of Silverlight 3.0) as the main framework to build applications on the phone. When building applications for Silverlight and WP7 you will find that you can reuse some of the code across the two platforms, Linked source files were used to share code between WP7 and Silverlight projects along with the use of compilation directives. Microsoft introduced a new way to create code that targets multiple platforms, it’s a Visual Studio Add-In called Portable Library Tools (Available here ) Portable Library Tools is a new Visual Studio add-in from Microsoft that enables you to create C# and Visual Basic libraries that run on a variety of .NET-based platforms without recompilation. In this post we are going to build a sample application for WP7 and Silverlight that uses the Portable Class Library Tools. We will create a CustomersExplorer appl

DevLifeStyle Community: June 2011 Event Recordings

I uploaded the sessions recordings for our last event to YouTube, you can find the list here: http://www.devlifestyle.net/content/DevlifestyleJune2011EventRecordings.aspx

MVVM

I will be delivering a session on MVVM Thursday June 30, in the DevLifeStyle community monthly meeting. To register and view the detailed agenda, click here

DevLifeStyle May 2011 Community Event

We are back again, join us on May 5,2011. I will be delivering a session on the new features in Silverlight5. To register and view the detailed agenda, click here

Silverlight 4.0 with SharePoint 2010

On Last Friday 25th I delivered an online session part of the Second Riyadh Online Community Summit, here is a recording of the session Download and here is the source code of the demos Download

Silverlight 4.0 Tutorial (12 of N): Collecting Attendees Feedback using Windows Phone 7

Image
You can find a list of the previous tutorial posts here Continuing our RegistrationBooth Application… It’s very important to collect the attendees feedback to help us improve the future sessions/events we might organize, we can go ahead and implement this functionality in the RegistrationBooth application. but in this post we will take a different approach, we will implement a Windows Phone 7 application that attendees can use on their phones to submit their feedback. Luckily for us Windows Phone 7 uses Silverlight as its development platform (along with XNA), the Silverlight version on Windows Phone is not the same one as the desktop version, think of this as a compact version that fits the phone capabilities. Before we start creating the phone application, first let’s think how we will bring the data to the phone, in the case of the Silverlight application we used WCF RIA services (DomainService) which provided rich client experience for the Silverlight application, Unfortunate