How To Use a .NET 4 Based DLL From .NET 2 Based Application?

May 30, 2011

Introduction The official answer is you can’t. Even with the In-Process Side by Side execution (SxS) feature, introduced in .NET 4. The SxS feature was intended to be used when COM is involved. For example, if you got an application that loads plugins, like outlook, and it loads 2 COM plugins, one is using .NET 4 and the other is using .NET 2.0 then it will load two versions of the CLR into the process using the new SxS feature. What if I simply have a .NET 2 application or DLL that needs to access a...
13 comments

A Customizable WPF MessageBox

May 26, 2011

Recently I came across the need to customize the look of the standard message box in the application. To do this I’ve decided to create a new class named WPFMessageBox, which will have the same interface as the standard one, will behave the same way and finally would be fully customizable, the WPF way, using control templates. Following is the result of this effort. Note: In the image you can see an example for a message box customization. Of course you are limited only by your imagination. The default control template looks like the standard...
6 comments

Sela Haifa Open House: Windows 7 features and Multi-Touch Session – Slide Deck and Demos

May 24, 2011

Today (24.05.2011) I’ve delivered two sessions about “Using Windows 7 Features in .NET applications” in Sela Haifa Open House which was presented in Philips building in Haifa. Dear Philips (and other) developers, I had a great time presenting today's Windows 7 sessions. Thank you for coming!   In the sessions I talked about how to use new Windows 7 features like the new Taskbar, sensors API, the Ribbon control supplied with Windows 7, Application restart and Recovery and plenty of Multi-Touch. We’ve seen numerous examples, mainly in C++ Win32, WinForms and...

Sela Developer Days 2011 – Save the Date!

May 20, 2011

Sela Technology Center is proud to present Sela Developer Days 2011 which will be held on June 26-30. One stage - hottest topics - Israel and world lead experts. A rare opportunity to hear all about the next big things in our technological world. 25 full-day workshops 15 lead experts 5 days You can find the full agenda on the conference website. Although I recommend ALL the lectures, I believe my blog readers will most enjoy...

.NET User Group: Windows 7 features and Multi-Touch Session – Slide Deck and Demos

Yesterday (18.05.2011) I’ve delivered two sessions about “Using Windows 7 Features in .NET applications” in the Israeli .NET User Group, at Microsoft offices in Ra’anana. I want to thank all the attendees who came to hear the sessions, I truly enjoyed it. In the sessions I talked about how to use new Windows 7 features like the new Taskbar, sensors API, the Ribbon control supplied with Windows 7, Application restart and Recovery and plenty of Multi-Touch. We’ve seen numerous examples in C++ Win32, C# WinForms, C# WPF and C# Silverlight. ...

Speed up Visual Studio Builds

May 17, 2011

Recently I got involved in a big project where we had a single solution with approximately 100 projects. Why 100 Projects in a Solution? The reason for a 100 projects solution is that like in many modular systems these days, we have the following three tiers: A few core / common projects every project will use. A large amount of modules, independent of each other. This tier directly depends on tier 1. A few end-projects which loads the different modules. This tier indirectly depends on tier 2. So, yes, we could create several solutions with each tier compiling only when needed and...

Coming session: Using Windows 7 Features in .NET Applications, at Sela Haifa in Israel

May 14, 2011

In case you missed one of my previous Windows 7 sessions, here is your chance to catch it. On May 24th I’ll be giving two sessions about “Using Windows 7 Features in .NET Applications”, as part of Sela Haifa Open House. On the first session “The 7 Show: From XP to Win 7” we will talk about new features in Windows 7 that will modernize your application. We will learn how to work with the new Taskbar, how to work with Sensors, how to use the Ribbon interface and more. ...
no comments

How to Check How Many Writes Are Done While You Build?

May 10, 2011

In the following post I’ll show you how you can measure how many read and writes (in bytes) your build takes. This may prove useful since the amount of writes can have a tremendous effect on the build total time. More on how to shorten your build time in a future post. Step 1: Download Process Monitor The key for measuring the build read and writes is to download the great tool by Sysinternals, Process Monitor. Process Monitor is a tool which monitors all the processes in your system for several activities, like: file-access, registry, etc....

Coming session: Using Windows 7 Features in .NET Applications, at .NET User Group in Israel

May 7, 2011

On May 18th I’ll be giving two sessions about “Using Windows 7 Features in .NET Applications”, as part of the monthly .NET User Group sessions, in Microsoft offices, Ra’anana, Israel. On the first session “The 7 Show: From XP to Win 7” we will talk about new features in Windows 7 that will modernize your application. We will learn how to work with the new Taskbar, how to work with Sensors, how to use the Ribbon interface and more. The session will be rich with examples in .NET,...
no comments

Managing Tombstone State in a Windows Phone 7 Application

May 1, 2011

Before we continue, I trust that you know exactly the meaning of tombstone state in a Windows Phone 7 application. If this is not the case, simply read Yochay’s great posts on the application execution model (Part 1, Part 2, Part 3). Every Windows Phone 7 application needs to manages tombstoning correctly to provide a better user experience and pass the application certification requirements. When your application goes into tombstone state, it is your responsibility to save all the application and page state, so that when the page gets reloaded it can recover properly and...