LP Pinsonneault blog's

Windows 8, Windows Phone, ...


Windows Phone 7 Developer Tools April 2010 Refresh

Microsoft just released a new version of their Windows Phone 7 Tools. You can download it at http://developer.windowsphone.com

Also if you want to have more information about this release Tim Heuer just post a great article: http://timheuer.com/blog/.../windows-phone-tools-update-april-2010-silverlight-xna.aspx

I’m finishing installing it.


Ottawa Code Camp – My presentation

Yesterday i did a presentation that was about Silverligth and Data called Data Matters. I’m very proud of my presentation i felt confident so i were able to stay in control and don’t loose focus.

The other guys (Colin Melia, Peter Henry, Sylvain Boucher) that are presenting with me did great presentation! Good job guys!

Through all the session we were building a complete project. The project that we build is available on CodePlex: http://ottawacodecamp.codeplex.com/. So feel free to download the code and test it.

Here is the PowerPoint for my presentation:


Debugging WCF Web Services

Currently I'm working on a Silverlight project, that retrieve some data from the server using WCF. Sometimes when there is some error the message return to the Silverlight application is : The remote server return an error: Not Found.


This pretty strange because I've flag the set the configuration <serviceDebug includeExceptionDetailInFaults="true" /> and the error doesn’t show up properly. And worst when you do step by step debugging, i won’t show you the error, and the application automatically raise the Completed event of that method you called.

So how can we know the exact error message?

There is a simple way to do that. Implement the System.Diagnostic in the .config file of the WCF application. In my case, it’s in the web.config of the web site hosting the services.

<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
<add name="traceListener"
initializeData= "c:\log\Traces.svclog" />

This will generate a file with some trace that you will be able to analyse with the Microsoft Service Trace Viewer. The application will show you in red where there is some error.


When we click on the line with the error, the right pane is updated to show more detail information regarding the selected trace. Again you will see in red where there is some error.


We then select the current error and the bottom pane will show you the exact error message that you will need.




This error is very simple to fix … but when you get the proper error message!

Hope this will help some of you.


Windows Phone 7 : Pivot Control

One of the most interesting UI interface is the Pivot (some call it Panoramic). I look in the tools provide by Microsoft to see if the control was available. But at this time, there was no control available. So I've look on the web and find a lot of interesting stuff on that subject.

I found some blog showing how to create the this kind of interface. Here is some links:

I’m also following Tim Heuer on Twitter(and on his blog)  and he post some reference on controls that implement the Pivot. Those controls are very easy to implement, because they implement template so we can implement as many section as we want. So you only have to refer to the DLL and use it as any other controls.

I hope you will find these links interesting.


MIX10 and Windows Phone


189685-windowsmobile_slideI’ve been lucky for the second year in row to go at MIX. I was very excited to be part of the event, because one of the main topic was about Windows Phone 7. I’m a long time fan of Windows Mobile.  I often think about building some Windows Mobile application, but i had to learn the .NET Compact Framework. But i didn’t had much time to learn that framework. Since I'm focusing my development skill on Silverlight, the announcement of Windows Phone was a great relief. My installation and testing the new tools was very easy.


I’m looking forward to develop some application using Silverlight on Windows Phone. So look often at this blog because i will post often about Windows Phone.


Globally MIX10 was not as surprising as last year because most of the announcement was not exclusive. We knew most of the announcement prior to the MIX. But i can easily tell, this was my preferred MIX at this time. Because, i took advantage of the event in many ways. I’ve learned a lot from the session which where very good. Also i had a good time meeting a lot of people, from which i learned a lot.


Here is some links for resources related to MIX and to Windows Phone.
MIX10 Resource:
Videos: http://sessions.visitmix.com

Windows Phone Resource
Tools: http://developer.windowsphone.com
Forum: http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series
Tutorial: http://channel9.msdn.com/learn/courses/WP7TrainingKit/WP7GettingStarted/YourFirstWP7AppLab/
Blog: http://windowsteamblog.com/blogs/wpdev



Expression Blend for Developers at TechDays 2009 Montreal – Part 2 – Creating Glass Effect

For the second part i will show you how to create some glass effect. Just as a reminder i’m not a graphic artist, i’m .NET Developer. As you can see Expression Blend allow any developer to improve the design without the help of a graphic artist or images (keep in mind Silverlight and WPF are vector graphic base).

Starting with the background I've created in the previous post we will add some stuff to have parts of the application looking like glass.

Now we will add an header that will look more fancy and glassy. First we will add a rectangle.


Again we will use the gradient properties to add the required effect. So we will change the background to use the gradient.


Now we will change the start anchor and set the Alpha to 20. After we will add a new anchor in the middle and set the Alpha to 50. We will add another anchor to the right of the last one just added, and we will set the Alpha to 15. Finally we will set the Alpha of the last anchor to 0.


To polish this title bar we can add a drop shadow. To do so, in the Properties under Appearance, there is a property called Effect. We now click on the New button. In Expression Blend there is some predefined effect available. You can now select DropShadowEffect.






Now we have an header that look a lot better. As you can see if we resize the window, the the opacity effect is visible in the header.



Now you can add some text in the header. You can also apply the DropShadowEffect on the text to make it more readable. And again you can play with the Gradient. Here is an example:


Now we will add glass effect over an image. So add an image in your application. Over this image we will add a new rectangle. This will be the object that will create the glass effect.

image image

Now we will set the gradient to a really soft blue #CEDDEC. Now we will need 4 anchor in our gradient slider. And the only thing that will change is the Alpha on each anchor.
(From left to right)
- 1rst : Alpha = 80
- 2nd : Alpha = 25
- 3rd : Alpha = 50
- 4th : Alpha = 30

Also I've changed the gradient arrow to make the illusion of the direction of the light.


The final result:



Next part: Working with Template and data binding to a sample data source.