Shared attribute in namespace 'http://schemas.microsoft.com/winfx/2006/xaml' can be used only in compiled resource dictionaries.
How to get out from this error, when working with xaml in dll/class library ?
Check if this helps
http://social.msdn.microsoft.com/Forums/en/wpf/thread/216762d4-ce21-4888-8d98-bbe4d30f7a03
In summary, Shared is only legal under the following conditions: