The exception is caused by the fact that telerik1
namespace does not exis in this style file. In fact Office2013Resource as well as all themes that support mark-up extensions (Windows8, Windows8Touch, Office2013 and VisualStudio2013
) reside in telerik
namespace. Since we are referencing different assemblies in our controls style files, our xaml preprocessor
renames them so that there are no collisions. In your case telerik1
points to Controls assembly and Controls namespace. Please replace telerik1
with telerik or controls (the latter was previously declared as namespace declaration) and everything should work as expected.
As for serializing ResourceDictionary - in fact XamlWriter.Save
method has some known limitations stated in msdn documentation
. Why do you need to do this with serialization and deserialization? Why don't you create a custom style - do the needed modifications there and apply it implicitly? Do you really need to load and save the whole resource dictionary? Any further information on the topic will help us better understand your scenario and assist you.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.