XAMLWriter.Save is not serializing VSM

Feb 24, 2009 at 12:53 PM
I am trying to serialize a style which contains visual state manager elements too.But the nodes under vsm is not serializing as expected.

Please help...
Mar 26, 2009 at 9:31 PM
Hi, you mentioned that VSM is not serializing as expected.  Could you please provide more information, what is the results you get and how is it different from what you expected?

Saied K
Mar 27, 2009 at 2:27 PM
This is the scenario.I have a wpf application with a style in it.The Style is using VSM ie it have VSM.VisualStateManger.VisualStates node.

I am loading this Style in my application through code and changing some values of color resources in it.After that if I serialize that Style object ,I can't see the VSM.VisualStateManage.VisualStateManager nodes in the xml.I need to have those nodes too in the serialized xml.

Hope this describes the scenario.I will send you a sample if you need more details.

Thanks for your time
Apr 1, 2009 at 8:50 PM
Hi Joy,

Thanks for explaining this in further detail, I think I have a pretty good idea where the source of the problem is.  I'll play around with this a bit and try to find a fix or at least a workaround.  Joy, I'll get back to you within the next couple of days.

Saied K
May 7, 2009 at 1:52 AM
Hi Joy,

We've looked into this further and it seems that the problem is caused by the VisualStateGroupsProperty property name.  The name is currently declared as "InternalVisualStateGroups" and it's causing problems with serializing the VisualStateGroups.  This problem is a bit more complicated than originally anticipated, but we're investigating further and we should have a fix for this in both the next release of the WPFToolKit as well as the .NET 4.0 framework.