Cannet QAT serialize/deserialize MyCommand

Ribbon for WPF Forum

Posted 8 years ago by Yuka Esaki
Version: 16.1.0633


I want to QAT Serialize button with MyCommand that inherited System.Windows.Input.ICommand.
However, the following error occurs and can not be serialized.

Cannot serialize a nested public type 'MyApplication.CommandManager+OperatingCommandExecuter'.

Could you tell us the requirements of the command to QAT serialize?

For your reference, I show you StackTrace

 System.Windows.Markup.Primitives.MarkupWriter.VerifyTypeIsSerializable(Type type)
 System.Windows.Markup.Primitives.MarkupWriter.WriteItem(MarkupObject item, Scope scope)
 System.Windows.Markup.Primitives.MarkupWriter.WriteItem(MarkupObject item, Scope scope)
 System.Windows.Markup.Primitives.MarkupWriter.WriteItem(MarkupObject item, Scope scope)
 System.Windows.Markup.Primitives.MarkupWriter.WriteItem(MarkupObject item, Scope scope)
 System.Windows.Markup.Primitives.MarkupWriter.WriteItem(MarkupObject item, Scope scope)
 System.Windows.Markup.Primitives.MarkupWriter.WriteItem(MarkupObject item)
 System.Windows.Markup.Primitives.MarkupWriter.SaveAsXml(XmlWriter writer, MarkupObject item)
 System.Windows.Markup.Primitives.MarkupWriter.SaveAsXml(XmlWriter writer, Object instance)
 System.Windows.Markup.XamlWriter.Save(Object obj, XmlWriter xmlWriter
 ActiproSoftware.Windows.Serialization.XamlSerializer.SaveToXmlWriter(XmlWriter writer, Object value)
 ActiproSoftware.Windows.Serialization.XamlSerializer.SaveToString(Object value)

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA


We are using Microsoft's built-in XamlWriter to serialize things there.  They have some notes on limitations in the MSDN but it might not cover everything.  In this particular case, the error they give says the serializer can't handle serialization of nested types.  You'll need to unnest OperatingCommandExecuter to work around that.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.