Ejemplo n.º 1
0
        // --------------------------------------------------------------

        public static void Write(XmlWriter writer, Pen pen)
        {
            XBrush.Write(writer, (SolidColorBrush)pen.Brush);

            writer.WriteStartAttribute(cnThickness);
            writer.WriteValue(pen.Thickness);
            writer.WriteEndAttribute();
        }
Ejemplo n.º 2
0
        // --------------------------------------------------------------

        public static Pen Read(XmlReader reader)
        {
            Brush b = XBrush.Read(reader);

            if (reader.MoveToAttribute(cnThickness))
            {
                return(new Pen(b, reader.ReadContentAsDouble()));
            }
            else
            {
                throw new FormatException();
            }
        }