0

I have a problem while Parsing a custom element with the XmlSerializer. My custom element looks like this (i removed all properties, it still does not work):

using System.Windows.Controls;
namespace MvvmControlChange.Content.Elements
{
    public class Test_Element : TextBox
    {
        public Test_Element()
        { }
    }
}

Now this line of my parser invokes a InvalidOperationException for Test_Element:

XmlSerializer serializer = new XmlSerializer(typeof(Test_Element));

The InnerExcetion tells me "There was an error reflecting property 'InputBindings'. Can someone help me?

LocalHorst
  • 1,048
  • 2
  • 11
  • 24
  • Is there an InnerException as well? – Lasse V. Karlsen May 07 '14 at 14:01
  • Where is the sense in serializing a TextBox control? If you'd tell us what you are trying to achieve here, we might provide an adequate solution. – Clemens May 07 '14 at 14:04
  • Its not easy to explain, its a rather cpmplex program where i need custom elements that extend classes like textbox or shape. @LasseV.Karlsen, the InnerExcetion tells me "There was an error reflecting property 'InputBindings'. – LocalHorst May 07 '14 at 14:22

0 Answers0