LP Pinsonneault blog's

Windows 8, Windows Phone, ...

NAVIGATION - SEARCH

DevTeach–Montreal

imageDevTeach is coming back to Montreal next week (May 30 to June 3). So on Monday May 30, there will be a pre-conference day where some subject like Agile Architecture, Extreme Database Design and Silverlight. Me and some colleges of RunAtServer will present the pre-conference on Silverlight. We will demonstrate and share on how to create a end-to-end application with Silverlight. Bring your laptop so you can enjoy the experience.

The next 3 days (May 31 to June 2) will be for the main conference. On my side, i’ll be presenting on the first day May 31st at 9h30. I will talk about “What you should know about Windows Phone 7 Development”. So i will demonstrate some of the new feature of the upcoming Mango update. I will also go through some of my real experience as a WP7 developer on some issue you may face and how to resolve them. So i hope to see you there.

On Friday June 3rd, there will be a post-conference days which will focus on Windows Phone 7, Sharepoint 2010 and Agile Development.

image

Regards,
LP

Portable Library – Share your libraries between multiple technology

Have you ever create an application where you want to share resources between them but you had to create multiple libraries to because those project use different compiler? If your like this often happen. In my case we face that issue. To solve the issue we had to create multiple libraries and refer class using linked files in the project. This is what we have to do in some project where we have a Silverlight 4 app and a Windows Phone 7 app. But this is not the most efficient way to do it.

Microsoft is now offering a solution for that kind of issue. The solution is called Portable Library, which is currently in CTP. So now you can create a single class library in which you can select which kind of project it should be compatible with. You should give it a look, because this may help you solve many issue and save times related with having common class libraries for multiple technologies.

To download the tools: http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981/

For more information:
http://blogs.msdn.com/b/bclteam/archive/2011/01/19/
announcing-portable-library-tools-ctp-justin-van-patten.aspx

Regards,
LP

Windows Phone 7 Developers Briefing in Montreal

Join us at the Microsoft Windows Phone 7 Briefing for Developers!

windows phone developer briefingsWant to learn how to create awesome applications and games for Windows Phone 7?

Want to extend your existing apps onto a new platform?

Want recognition, exposure, and reach in an untapped marketplace?

RunAtServer will be presenting this Windows Phone 7 Briefing on behalf of Microsoft, you will learn more about developing on it’s latest mobile platform.  The briefing will cover three sessions exploring the two application frameworks available for Windows Phone 7, where to find developer resources, how to submit apps into Marketplace, and much more!
Session 1
6:00pm - 7:00pm - Apps with Silverlight
Session 2
7:15pm - 8:15pm - Games with XNA
Session 3
8:30pm - 9:00pm - Next Steps

When:
December 7

Where:
Intercontinental Hotel
St-Jacques
360 Rue St Antoine W
Montréal (Québec) H2Y 3X4
Canada

Registration link
https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032470418&Culture=en-CA

 

Other cities:

Register Today:

Ottawa, On – November 30, 2010
Calgary, AB – December 01 2010
Mississauga, On – December 2010
Montreal, QC – December 7 2010
Toronto, On – December 9 2010

See you there!

LP

Presenting at .NET Montreal Community on Windows Phone 7 on Monday November 15th

windows_phone_introTomorrow, it'll give a full session at the .NET Montreal Community about Windows Phone 7. In that session I'll give a full end to end overview of my experience building applications for Windows Phone 7. So I'll start with the idea through the development process and finally publishing the application to the marketplace.

If your interested, I’ll be also available to answers your question. I’ll also have a device so you can test and feel the new OS which is now available since November 8th.

For more information : http://www.dotnetmontreal.com/.../Default.aspx?selecteddate=15/11/2010

 

 

See you there!
LP

Windows Phone 7 – Suspend mode

Recently i was publishing an updated version of an application on the Marketplace for Windows Phone 7, and my update failed the testing process.

Why?

Comments: The user isuse  presented with an error message when the location services are disabled on the device. The error
message that is displayed is not a user friendly message.
Steps to reproduce:
1. Turn on location service on device.
2. Launch the application and select a location
on the venues page.
3. Swipe to the map page and select view map.
4. When map is loaded press the Start button on the device. 5. Go to the settings of the device and turn off location service.
6. Press the Back button from the Start screen of the device to reactivate the application.
7. Notice a non-user friendly error notification appears.

Real reason
In reality the problem is not related with the location services. Because i don’t use the location service (i only use the Bing Map for display only).  In fact, the real problem it’s that i forgot to handle the Deactivated event and the Activated event.

Why do we have to handle the Activated and Deactivated event?
Windows Phone 7 doesn’t support multiple application running at the same time (except for some application approve by Microsoft). But when your application is running, for different reason (incoming phone call, the user click the start button, …) the application can be suspended. To eliminate some issues you should handle those event and make sure you persist important information.

gg266441_788be805-086f-49cf-9911-fc638a953c92_png(en-us)

One of the best place to handle these events is in the App.xaml. To do so you need to declare the events in the xaml code.

<Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService
            Launching="PhoneApplicationService_Launching"    
            Closing="PhoneApplicationService_Closing"
            Activated="PhoneApplicationService_Activated"    
            Deactivated="PhoneApplicationService_Deactivated" />
    </Application.ApplicationLifetimeObjects>

In the Activated event, you can store some data in the the Microsoft.Phone.Shell.PhoneApplicationService.Current.State dictionary. And in the Deactivated event, we can retrieve that information.

Conclusion
Make sure to test any scenario that a user may face. Currently, the testing process that Microsoft implemented is pretty exhaustive (which is good because it help ensure that the application in the Marketplace won’t crash).

Reference
http://msdn.microsoft.com/en-us/wp7trainingcourse_applicationlifetimewp7lab_topic2.aspx
http://bolingconsulting.com/blog/?p=46

Regards,

LP

Important update about the PDC and Silverlight

Last week at PDC, Bob Muglia (President of the Server and Tools Division at Microsoft) have been interviewed about Silverlight vs. HTML5. In the interview, he sais “Our Silverlight strategy and focus going forward has shifted.” . Today, he publish a letter to apologize an drectify the meaning of his word which cause some confusion.

Here is the letter: http://team.silverlight.net/announcement/pdc-and-silverlight/

“Make no mistake; we’ll continue to invest in Silverlight and enable developers to build great apps and experiences with it in the future.”,Bob Muglia

In clear, Silverlight is there and will continue to evolve more than ever.

Regards,
LP

IE 9 and Debuging in Visual Studio

Some of you probably find out that the beta version of IE9 seems to cause some issues when we want to run an ASP.NET or Silverlight in debug in Visual Studio. In reality, there is no issue. In fact, it’s IE9 who is too fast, compare to the Web Development Server (also called Cassini) which take longer to instantiate. A friend of the .NET Montreal Community Étienne Tremblay found a workaround for this issue. He wrote a post about his solution: http://geekswithblogs.net/etiennetremblay/archive/2010/10/07/ie-9-cassini-and-the-dreaded-dns-error-or-page.aspx

I tried it and it work fine for me!

Thanks Étienne!

Regards,
LP

Montreal .NET Community : Developing Silverlight/WPF for Blendability: Smooth Developer/Designer Workflow

This thursday Barry Garvin will present an interesting session at the Montreal .NET Community.

Here is his presentation description:

Microsoft has continued to make investments in both Expression Blend and Visual Studio to facilitate the workflow between the designer and developer roles. This is even more important if you as an individual fulfill both of these roles. However, having version control support in Blend and a design surface in Visual Studio 2010 isn't enough to ensure this back and forth workflow is smooth. In this session we'll examine techniques and patterns to ensure that your projects remain "Blendable" and "Testable" from start to finish. We'll review patterns such as model-view-view-model and attached behaviours to provide not only clean separation of concerns and testability, but also that elusive "Blendability" allowing you to take advantage of Blend's power throughout your project.

For more information : http://www.dotnetmontreal.com/.../Default.aspx?selecteddate=05/10/2010

See you there.

Regards,
LP

Windows Phone 7 – Upgrading to the RTM version of the Developer tools for Windows Phone 7

Last week Microsoft released the RTM version of the Developer Tools for Windows Phone 7. This weekend i took some times to migrate the application that I’m creating for the TechDays .  The migration took me about less than 30 minutes.

I only had to fix one issue, which is related to the RTM version. The WMManifest.xml have changed since the Beta version. To fixe the issue i had to create a new Windows Phone 7 project and copy the WMManifest.xml file in my application. And the application was building again.

In the beta version, the Panorama and Pivot controls was not available as built-in control. There was a project on codeplex which provided the functionality. So moving to the RTM, was pretty simple. I only had to declare a namespace :
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls".
After what i have to change the control type. That was simple as that.

The Panorama and Pivot control are working perfectly and smooth. And much better than the other version.

Also they provide natively a Map control, which is a Windows Phone version of the Bing Map for Silverlight. I was waiting for that specific control for a long time. I only had to do a drag and drop and assign the CredentialProvider properties and the control was working.

Also the team who was working on the Silverlight Toolkit have created a version of the toolkit for Windows Phone. So i was able to use the WrapPanel from the Toolkit instead of importing some code file from the original Silverlight Toolkit.

For the emulator, it have been improved again. The start time have been improved.

In conclusion, i think as a developer we have all the tools we need to be able to build great Windows Phone 7 application.

What you need to download to start building Windows Phone 7 applications

Resources about Windows Phone 7

Regards,
LP

Silverlight Service Release 4.0.50826.0

Microsoft release today a service release for Silverlight. This service release fix issues that were in introduce in the RTW version:

  • SDK feature to enable Add New Row capabilities in DataGrid control
  • Improving startup performance of Silverlight applications
  • Adding mouse wheel support for out-of-browser applications on the Mac platform
  • Various media-related fixes around DRM content
  • Fixed memory leak when MouseCapture is used
  • Fixed memory leak for DataTemplate usage

Lately i was working on project that were affected by the DataTemplate memory leak. So i was waiting for that fix. I hope this will help.

The only thing we need to do to apply the latest change is to set the “minRuntimeVersion” and “autoUpgrade” int the object tag:

<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="autoUpgrade" value="true" />

For more information:
http://timheuer.com/blog/archive/2010/09/01/silverlight-service-release-september-2010-gdr1.aspx

Regards,

LP