November 2010 - Posts
My journey to TechEd began with a flight at 12:30 from Natbag, courtesy of Microsoft (thanks again Michal).
Unfortunately, since my flight was at 12:30 (and actually left at 13:00), I had no chance of make it in time to the first session, “Developers Tools and Technologies Keynote” by Jason Zander.
This was especially annoying since the entire session revolved around a project I’ve been personally working on for the last few months, named FlashCards.Show.
In FlashCards.Show I’ve ported a WPF reference application to both a Silverlight web application and a Windows Phone application.
The three versions of the app (WPF, SL & Phone) use Windows Azure platform to share their data. Azure is also used to host a WCF web service and the Silverlight web application. Very cool.
This FlashCards.Show project was also used to demonstrate the new capabilities of the Coded UI Testing for Silverlight, available with Visual Studio 2010 Feature Pack 2.
All in all, I’m very proud that my work was presented and used by Microsoft personnel to show many new Microsoft technologies. I’ve heard they even thanked me on stage
. I can’t wait for this video to be available on TechEd video channel.
I’ve arrived just in time for the next lecture “Parallel Programming in .NET Framework 4: Task Parallel Library, PLINQ and more“ by Stephen Toub. I’ve planned to cover this lecture in this post but Gadi already done a great job.
Afterwards I’ve went to Sela’s VIP suite to have some drinks and meet with other Sela experts. In case you haven’t heard, Sela’s VIP Suite is where Sela’s expert are available to answer questions 1-on-1. Entrance is for invited people only.
Then I had dinner at my hotel, went to the primary TechEd session and Partners Cocktail. Same as all of you.
That’s it for now,
Arik Poznanski.

Due to popular demand on instructions for how to use the new version of the Ribbon for WinForms project, I’ve asked Bernhard to write a small tutorial.
Bernhard agreed and wrote an excellent quick start tutorial, which now I present to you:
http://bernhardelbl.wordpress.com/2010/11/17/quickstart-tutorial-windows-ribbon-for-winforms/
Note that the first 3 steps should be done only the first time you create a ribbon enabled application.
This leaves us with just a single step in the tutorial. Couldn’t get easier than that!
That’s it for now,
Arik Poznanski.
The Problem
How many times have you seen the following code snippets?
1. Checking method parameters
if (executeMethod == null)
{
throw new ArgumentNullException("executeMethod");
}
2. Implementing a property in a WPF / SL view-model
public double Size
{
get { return _size; }
set
{
_size = value;
RaisePropertyChanged("Size");
}
}
The first time I had to wrote code like this I felt uneasy. Hardcoded strings are bad practice and should be rarely used.
Even worse, using a hardcoded string of an identifier is just a bug waiting to happen.
Consider what happens when you need to refactor your code and change the name of the Size property (second example) to something different like MaxSize.
The refactoring tools will not change the hardcoded string “Size” and now your WPF application stops notifying on property change the way it should!
These bugs are very difficult to spot. No compile time error, no runtime error. Nothing. The only way to spot this bug is by testing this specific functionality.
I’ve checked a small WPF application and found 158 (!) instances of these
almost-bugs.
The Solution
Are you familiar with the typeof operator?
Don’t you just loved it if there was a stringof operator?
Well, there isn’t!
So I’ve implemented the closest thing: @string.of()
To use it simply write:
string s = @string.of(() => Size);
Since the implementation uses expression trees the syntax might look strange, but as I’ve said, that’s the closest you can get without being a member of the C# development team.
Here you can find a full example that uses the @string.of operator on various inputs: local variable, parameter, property, field and function.
That’s it for now,
Arik Poznanski.
In a few hours your last chance to register TechEd Israel 2010 will fade away.
For those who don’t know, TechEd is the conference for presenting Microsoft’s latest IT technologies to IT personnel, managers and of course, developers.
If you’re coming to TechEd, make sure you check-out the following sessions presented by SELA’s experts:
- XNA Game Studio 4.0 by Alex Golesh
- What You Need to Know about Migrating from Internet Explorer 6 to Internet Explorer 8 by Amit Marlov
- WPF & Silverlight – More than just best UI by Elad Katz
- Entity Framework 4 by Gil Fink
- Windows Azure Storage by Manu Cohen-Yashar
- Performance and Debugging in Visual Studio 2010 by Sasha Goldshtein
- Applied Software Testing with Visual Studio 2010 by Shai Raiten
- Customizing TFS 2010 Build and deploy Processes by Shmulik Segal
In addition, Shlomo Goldberg and I have the honor to come to TechEd as Microsoft guests. So make sure you drop by..
That’s it for now,
Arik Poznanski.

The Windows Ribbon for WinForms is a ribbon control designed to be used with WinForms applications.
Yea, I know, WinForms is so last year, but it turns out people still use it and keep asking for features and bug fixes..
Anyway, it is a managed wrapper around Windows Ribbon Framework, provided by Microsoft in Windows 7 and Vista.
More details on this project can be found in the project site: windowsribbon.codeplex.com .
So, what’s new?
- Simplified use for the Ribbon control.
Simply drag and drop the ribbon control into your form and you’re good to go.
no implementing IRibbonForm, no handling sizing, no calls to InitFramework and DestroyFramework. - Localization support added
- Solution updated to .NET 4 and Visual Studio 2010
- RibbonGenerator custom tool added
- Added ability to specify keyboard shortcuts in XML format
- and a few bugs where solved (specifically, the one with the galleries)
What About the Samples?
All of the 18 samples have been updated to use the new infrastructure.
Not only that, there is a new sample, “19-Localization”, that shows how to use the new localization support with the ribbon control.
You can find more details on the localization support and RibbonGenerator custom tool in this article on CodeProject.
Anything else you should know?
Just make sure you have compiled and installed RibbonGenerator. A setup project is part of the package. This is required for the generation of the ribbon DLLs.
Thanks
I would like to thank Bernhard Elbl for his great contribution to the project. Bernhard is now part of the project development team on codeplex.
That’s it for now,
Arik Poznanski.
The virtual ink has not yet dried on my PDC 2010 summary and I’ve just been informed that I was chosen to be a guest of Microsoft in TechEd Israel 2010.
Thanks, Microsoft, I really appreciate it!
If you’re coming to TechEd and want advice on WPF, Windows 7, Silverlight or Windows Phone 7 feel free to stop by for a chat.
And make sure you follow my blog for some TechEd development related updates.

That’s it for now,
Arik Poznanski.
PDC 2010 is over for almost a week now, so I’ve decided it’s a good time to summarize the experience.

Only a thousand of us, developers, gathered in the rather small chamber to hear Steve Ballmer and Bob Muglia keynotes.
So what have we heard?
We heard about the latest version of Microsoft browser, Internet Explorer 9, which will offer great support for HTML 5 and an improved user experience for sites running on windows (see IE9 pinned sites on Windows 7 taskbar for more details).
We heard about the new mobile operating system Windows Phone 7, which is scheduled to be released in USA on the 08.11.2010. Of course, it didn’t stop Microsoft from giving a free WP7 device for each PDC participant..
By the way, if you haven't seen it already, check out this Windows Phone 7 ad, really fun to watch..
Finally, we heard about the new features coming to Windows Azure, which is another step in the right direction.
Another small announcement which was hidden in the sessions was the new asynchronous programming support in C# vNext. If you can’t wait for this to arrive, download the CTP here.
During the sessions I’ve written quite a few blog posts. Most of them were from the Client and Framework channels.
I think the most interesting lecture was by Anders Hejlsberg on C# asynchronous programming. Oren Nachman also gave a very good lecture on optimizing performance for Windows Phone 7 Silverlight applications.
Of course, I haven't seen all the lectures (yet), so if you know of a good session, do post it in the comments.
I can’t say PDC was innovating, but then again, I do work at SELA, where we learn and use the most innovative tools ahead of their public appearance..
All in all, it was interesting and fun.
For all those who missed PDC, come to hear SELA’s experts about the latest and most innovative Microsoft technologies at the coming SELA Developer Practice (SDP) event.
On a personal note, this was my first PDC and my first time at Redmond, WA.
I enjoyed it very much and I was amazed of the beauty of the city. Here is a nice random picture outside my hotel, notice the trees comes in 3 different colors: Red, Green and Yellow.

That’s it for now,
Arik Poznanski.