Mix10 : first Windows Phone application using Blend4

Events, Silverlight, Windows Phone No Comments »

You’ll need not more than a couple of minutes to download and install all the tools needed to create your first Windows Phone application using Blend.

Here is a tour in images:

Welcome in Blend 4

Discovering new projects templates in the Welcome dialog:

It must be quite familiar to you if you’re working with WPF or Silverlight

Choosing a target

Launching the app in the emulator

App.xaml file has all the resources for the Windows Phone theme

Let’s go now and play with the tools :-)

Mix10: Windows Phone 7 series development tools available

Events, Silverlight, Tools, Windows Phone 1 Comment »

The first keynote of Mix10 is just over and the biggest announcement I was waiting for occured: Windows Phone 7 series development tools are NOW available for FREE.

Grab the tools right now ! You’ll need:

If you want more details about Blend4, you can check out Christian Schormann’s overview. A new website is now live for all Windows Phone 7 series related development information at http://developer.windowsphone.com/

Another announcements is the availability of Silverlight 4 RC and support for VS2010 RC:

For more information about Silverlight 4 RC, you can check out the blog post of Tim Heuer.

I can’t wait to play with all this new stuff. It’s very impressive to see the work done around Windows Phone 7 series. WPF and Silverlight developers just became Windows Phone developer today, and I think this is great !

I’ll give more feedback as soon as the tools will be installed :-)

Mix10 starting today !

.Net, Events, Silverlight, Visual Stutio No Comments »

Mix10 is starting today and we can expect many cool announcements during the keynote. You can watch the keynote online at live.visitmix.com. I’ll try to give feedback as soon as possible. Because I’m not lucky enough to be in Vegas, I’ll watch the keynote tonight (French time !) at home with some coworkers.

Last information before the keynote, it looks like we’ll have some announcements about Silverlight running on Symbian devices…

Changing the layout of a WPF TreeView to look like multiple ListBox

WPF No Comments »

Last week at work I was requested to create a new control which should have the behavior of the WPF treeview with a template involving multiple ListBox. To understand what I mean, I wanted to change the layout of this:

To this:

Of course, selection must work properly:

I asked a question on StackOverflow about this control because I didn’t find any easy way to do it. I though at the beginning that playing with the templates of the TreeView and TreeViewItem would do the trick but it didn’t.

The solution I finally choose involves creating multiple ListBox and wire them together using DataBinding:

  • I create a new CustomControl which inherits Control (I couldn’t use neither Selector or TreeView because I wouldn’t have been able to manage the SelectedItem property from the derived class)
  • In the template of this CustomControl is an ItemsControl. This ItemsControl has its ItemTemplate property set to a DataTemplate containing a ListBox.
  • The CustomControl has a Depth property of type int. This property indicates the number of ListBox that should be generated.
  • The CustomControl automatically databound ListBoxes together: each ListBox’s ItemsSource property is databound to the SelectedItem’s children property of the previous ListBox in the visual tree.
  • The CustomControl has a SelectedItem property and a SelectionChanged event (like Selector-derived class).
  • I added an IsReallySelected attached property to the ListBoxItem which are generated. This enables to databing an IsSelected property of the ViewModel class behind the control with the IsSelected of the ListBoxItem. I had to create an attached property because its value is true when the ListBoxItem is selected AND the parent ListBox has IsSelectionActive set to true.

Here is the result:

You can download the source code of this sample (VS2010 RC solution).

Mix10 is coming : Windows Phone 7 series sessions announced !

Events, Silverlight, Windows Phone No Comments »

Next monday, Mix10 will start in Las Vegas. Even though it’s a little bit far from my place here in France I’ll try to give feedback after the keynotes and as soon as first videos will be available. I’m sure you’re aware that major announcements this years at Mix will be about the Windows Phone 7 series.

To make the long story short :

I’m sure you realize that we are going to a very capable and powerful mobile platform here:

  • all existing .Net and Silverlight developers are going to be able to write apps for the Windows Phone (this is HUGE)
  • we are going to finally have the 3 screens version of Microsoft: develop once and then run on your mobile, your PC and your TV (XBox)

Mix10 website now contains the name and the description of the sessions which are dedicated to the Windows Phone 7 series:

If you’re using Twitter, make sure to watch the #wp7 hashtag. It make not any doubt the next week is going to be very informative about Windows Phone 7 series.So stay tuned !

Using Reflector to debug a .Net app in Visual Studio without the original source code

Tools, Visual Stutio No Comments »

Many .Net developers use to say “if you’re a serious developer, then you MUST Reflector”.

I would like to add another statement: “if you want to have an insight and powerful look at how things works internally, use Reflector Professional”.

Last Wednesday, RedGate released a new version of Reflector. You’re probably going to download it soon or later because your actual version is going to expire. When you’ll download the free version, you’ll automatically get a trial (14 days) of the professional edition. Nice, but what’s so special about this edition ?

Let’s see a demonstration of what can be done using Reflector Pro. The following is not an ad for RedGate, I’m just totally amazed by their new feature :-)

1. Reflector is now integrated into Visual Studio (2005, 2008 and 2010 RC):

2. Select the “Choose Assemblie to Debug…” option to select .Net assemblies for which you don’t have the source code. In this example, I’m using one of the Blend3’s assemblies:

3. Once the process is completed, select the “Explore Decompiled Assemblies” option:

4. Browse to your target assembly and select an interesting type:

5. Put a breakpoint in the code, like you do every day when you debug an app:

6. Run the executable

7. Debug Blend3’s source code ! Use breakpoints, step into methods, inspect variables…

And that’s it. With Reflector Professional, you can:

  • Decompile third-party assemblies from within Visual Studio
  • Step through decompiled assemblies and use all the debugging techniques you would use on your own code. This is incredibly powerful as we saw by debugging Blend3″s source code !

Reflector Professional is available for about 195$ on RedGate website

Minor update to the Silverlight MVVM frameworks explorer

Silverlight, WPF 1 Comment »

Thanks to the readers who gave me feedback on my Silverlight MVVM frameworks explorer I updated the application this morning in order to fix some problems.

Here is the change set:

  • fix incorrect URLs
  • fix incorrect “Silverlight Support” options. As Laurent Bugnion said in the comments, his MVVM Light framework was the only one supporting Silverlight which was strange…
  • links now open in a new window

Click on the following image to launch the Silverlight application.

About adding new frameworks, I’m not sure to add those which targets a much larger domain than MVVM itself. CompositeApplication guidance for example is a lot more than MVVM…

WPF internals part 2 : how the WPF controls are organized ?

.Net, Silverlight, WPF No Comments »

A couple of weeks ago, I started a series of articles about WPF internals organization. In the first article I did a tour of the core WPF classes. In this second part, I’m reviewing the organization of the various controls that exist in the framework.

Because the image of the diagram is pretty big, I decided to use Silverlight DeepZoom and the result is just below this text :-) You can download the full image resolution here. Please use the full screen button in the upper right corner of the viewer for the best browsing experience.

    Here are general remarks that might help you get information from those diagrams.

    The top level Control class:

    • Defines general UI properties such as Background, Foreground, BorderBrush and BorderThickness
    • Defines a set of properties to control font rendering: FontFamily, FontSize, FontStyle…
    • Has a DoubleClick event (other mouse events such as MouseUp/MouseDown comes from the UIElement class)

    Below the Control class, we have (this list is not complete):

    Below the ContentControl class we can find many existing WPF controls:

    General other remarks:

    • It’s funny to see that both Window and UserControl inherits from ContentControl. Before doing the diagram I though that Window came from somewhere else :-)
    • Having those diagrams in mind (or on a screen !) is very useful when you need to create your own custom control
    • We can see the differences between creating a custom control (inherit from Control or derived class) and a UserControl (inherit from UserControl)
    • .Net4 will introduce new controls (not in this diagram) in the WPF framework such: DataGrid, Calendar, TimePicker

    kick it on DotNetKicks.com

    Review of 2009 blog posts

    General No Comments »

    In the past year, I’ve posted more than 30 articles on my blog. Here is a summary of those posts (link in bold are those which got the most traffic during the year). Obviously, MVVM was a very hot topic during 2009 :-)

    January

    February

    March

    April

    May

    July

    August

    September

    October

    November

    Windows Azure challenge

    Events No Comments »

    A couple of weeks ago, the French developpez.com website launch a challenge in collaboration with Microsoft to help developers discover the Windows Azure platform.The goal was to succeed 5 different steps in order to win the challenge and get two prizes. The first one was a wifi teeshirt and the second one the new Microsoft Arc Mouse.

    It was my first real experience with the Azure platform and I was very happy to be able to manipulate the platform through various real-world example. The steps were the following:

    1. Deploy an existing application on Azure
    2. Modify an existing application and then deploy it on Azure
    3. Deploy an existing application using Blob storage
    4. Fix a Winforms application using the Azure API to backup files and folder
    5. Answers several questions about the Azure platform

    The steps were both educational (each time we discovered a new feature) and challenging (we must make it work !). I would like to thank very much the organizers of this event: Jérôme Lamber, Louis-Guillaume Morand, Phillippe Vialatte, Pierre Couzy and Thomas Lucchini.

    Hopefully, we’ll see more challenges in the future on the developpez.com website.

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS Log in