title: Serializing a Control in Silverlight
body: <p>I am trying to serialize a control to XAML in Silverlight 5.
  Basically, I am using the following code:</p>
  
  <pre><code>var ignore = new XmlAttributes();
  attrs.XmlIgnore = true;
  
  var overrides = new XmlAttributeOverrides();
  overrides.Add(typeof(FrameworkElement), "Resources", ignore);
  
  var serializer = new XmlSerializer(control.GetType(), overrides);
  </code></pre>
  
  <p>However, when I try to actually serialize the control, I get an exception about the Resources property implementing IDictionary, although I specifically marked it for ignoring.
  What am I doing wrong? Any other way to do this?</p>