All posts by Jeremy

Where does the default TwoWay binding comes from ?

I got a comment on my post about a very simple MVVM application about the fact that removing the TwoWay mode on a binding did not change the behavior of the application. This is a quick occasion for me to share a quick explanation about this.

Actually and as you already know if you can write XAML like Text={Binding …} it is only because Text is a Dependency Property. Also, dependency properties are defined in a static way (so that if you have 50 textboxes you don’t have to instantiate 50 times the Text property). The default behavior for the mode of the binding (TwoWay, OneWay, etc.) can be found in the static declaration of the dependency property. For example, in the case of the Text property of the TextBox we have:

TextProperty = DependencyProperty.Register(
	"Text", 
	typeof(string), 
	typeof(TextBox), 
	new FrameworkPropertyMetadata(
		string.Empty, 
		FrameworkPropertyMetadataOptions.Journal 
		| FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
	new PropertyChangedCallback(TextBox.OnTextPropertyChanged), 
	new CoerceValueCallback(TextBox.CoerceText),
	true, 
	UpdateSourceTrigger.LostFocus));

The interesting part here if of course the BindsTwoWayByDefault option. Note that this is the only default option available (we can’t have a OneWayToSource binding by default).

[WP7] Beta build of the Windows Phone 7 tools is available

I guess many Windows Phone 7 developers have been waiting for this news since many weeks. It’s finally official: the Beta build of the Windows Phone 7 tools is out. If you want to download the new version here is the link.

This new version has been released during WPC (Microsoft Worldwide Partner Conference). For more information, please check-out:

  • the post on the Windows Phone Developer Tools blog.
  • this post by Jaime Rodriguez about all breaking change between the April CTP Refresh and the Beta build
  • this post by the Blend team about the new features available in Blend
  • the release note

Here are a summary of the changes in this new version:

  • Despite HW acceleration effects have been removed from the platform (DropShadow and Blur effects are now no-op). This feature might come back later.
  • Compatibility with Blend 4 RTM
  • API near final
  • Various fixes

Note that panorama and pivot controls are coming in the next weeks… Grab you copy now and enjoy Windows Phone 7 development 🙂

http://www.microsoft.com/downloads/details.aspx?FamilyID=c8496c2a-54d9-4b11-9491-a1bfaf32f2e3&displaylang=en

MVP in Client Application Development !

A couple of days ago I received an email telling me I got the MVP Award for 2010 ! I’ve been waiting a little bit before I wrote this post because I invited my coworkers at home in order to celebrate this yesterday and I wanted to keep the surprise 😀

This is the very first year I got the MVP award. I’m very proud to have this recognition from Microsoft and it is giving me new ideas for the future. I started this blog almost 2 years ago now and I’d never imagine I’d get so much feedback about it. My MVP award is also recognizing my work in the French community (on the developpez.com website) or for conferences I’m giving in my daily job.

The MVP award will be also for me the occasion to have pre-release of Microsoft software (but I’ll not be able to publicly give information about them since I’ve just signed an NDA) and also to enjoy a free MSDN-Premium subscription !

For more information about the MVP Award Program you can check-out:

Thanks to all my readers also who are giving me feedback and support.  I’d also like to thank my co-workers who are helpful in my daily job. I’m very lucky to be part of this very nice team. By reading posts before they go public (Charlotte, Fred !) or discussion about software programming in general (the whole Pythagore group!) I get cool ideas about things I want to share. So thank you every one for supporting me 🙂