In WPF it was possible to organise the XAML for multiple user controls by keeping the markup in separate XAML files in the themes folder and then using MergedDictionaries to import them into generic.xaml:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="MyFirstControl.xaml" />
<ResourceDictionary Source="MySecondControl.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
With the availability of the Silverlight 3 beta introducing merged dictionary support, it seemed like it might be possible to do the same with Silverlight user controls. But despite trying all combinations of build action on the merged dictionary files and the corresponding syntax for the source reference in generic.xaml, I can't seem to get it working.
Has anyone else tried? Does anyone know if it is possible and if so what I am doing wrong?
OK - so after numerous test projects, getting working samples in WPF and moving the XAML and C# code over to Silverlight 3 and it still failing, I did a full uninstall and reinstall of ALL the Silverlight 2 bits AND ALL the Silverlight 3 beta bits and finally got things working.
I can only assume that I somehow ended up with a faulty install of the beta - I don't know but it seemed like I was still running in the Silverlight 2 runtime despite apparently having the version 3 runtime installed.
Thanks Jared for taking a look at things and checking with the SL3 team...and thanks to Amy Dullard and Shawn Wildermuth for producing the instructions and batch files for running Silverlight 2 & 3 on the same machine.