GenericListXamlContent Sample

Back to summary

Source

using System.Collections.Generic;
using System.ComponentModel;

namespace XmlSerializersTest.Samples
{
    [Title("Generic list with Content attribute")]
    public class GenericListXamlContent
    {
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public List<string> Strings { get; set; }
    }
}

Standard Serializer

<GenericListXamlContent>
  <Strings>
    <string>foo</string>
    <string>bar</string>
    <string>baz</string>
  </Strings>
</GenericListXamlContent>