ColorProperty Sample

Back to summary

Source

using System.Windows.Media;

namespace XmlSerializersTest.Samples
{
    [Title("Property of type Color")]
    public class ColorProperty
    {
        public Color Color { get; set; }
    }
}

Standard Serializer

<ColorProperty>
  <Color>
    <A>255</A>
    <R>255</R>
    <G>0</G>
    <B>0</B>
    <ScA>1</ScA>
    <ScR>1</ScR>
    <ScG>0</ScG>
    <ScB>0</ScB>
  </Color>
</ColorProperty>