Using Merged Resource Dictionaries inside Themes/generic.xaml

December 20, 2007

For some reason including a ResourceDictionary into the Themes/generic.xaml does not behave the same as including a ResourceDictionary into App.xaml.

If you include a ResouceDictionary into Themes/generic.xaml you will receive an exception telling you that the dictionary cannot be assigned to property ‘Source’ of object, yada, yada, yada, very informative.

Exception:’MyDictionary.xaml’ value cannot be assigned to property ‘Source’ of object ‘System.Windows.ResourceDictionary’. Cannot loc
ate resource ‘mydictionary.xaml’.  Error at object ‘System.Windows.ResourceDictionary’, Line 9 Position 23.

What the exception is trying to tell you is that the included ResourceDictionary file was not found on the output folder, (meaning that it was expected to be an external resource).

What to do then, instead of:

<ResourceDictionary.MergedDictionaries>

    <ResourceDictionary Source=”MyDictionary.xaml” />

</ResourceDictionary.MergedDictionaries>

You should write it like this (specifying that the included resource is embedded into the assembly):

<ResourceDictionary.MergedDictionaries>

    <ResourceDictionary Source=”/My.Controls;component/themes/MyDictionary.xaml” />

</ResourceDictionary.MergedDictionaries>


Microsoft Expression Blend 2 December Preview is Here

December 8, 2007

The Microsoft Expression Blend 2 December Preview is here. Some of the new features are: Support for VS2008, Path Editing and Animation, Adding Multiple Projects to a single solution and etc.

Enjoy.


Open Source CD/DVD burning tool.

December 6, 2007

A week ago I came across InfraRecorder, an open source CD/DVD burning tool.

After being disappointed from the burning features of Windows Vista, I was very happy from what I found.

It works very well under Windows Vista. It doesn’t require installation and its only 8MB in size, what’s make it suitable for running it from a DiskOnKey.

You can download it from here.

Enjoy.