Example #1
0
            public static object SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent, bool nativeCall)
            {
                LabelPlotStyle s = null != o ? (LabelPlotStyle)o : new LabelPlotStyle();

                s._font               = (Font)info.GetValue("Font", s);
                s._independentColor   = info.GetBoolean("IndependentColor");
                s._brush              = (BrushX)info.GetValue("Brush", s);
                s._xOffset            = info.GetDouble("XOffset");
                s._yOffset            = info.GetDouble("YOffset");
                s._rotation           = info.GetDouble("Rotation");
                s.HorizontalAlignment = (System.Drawing.StringAlignment)info.GetEnum("HorizontalAlignment", typeof(System.Drawing.StringAlignment));
                s.VerticalAlignment   = (System.Drawing.StringAlignment)info.GetEnum("VerticalAlignment", typeof(System.Drawing.StringAlignment));
                bool     attachToAxis = info.GetBoolean("AttachToAxis");
                EdgeType attachedAxis = (EdgeType)info.GetValue("AttachedAxis", parent);

                s._backgroundStyle = (IBackgroundStyle)info.GetValue("Background", s);
                s._labelColumn     = (Altaxo.Data.ReadableColumnProxy)info.GetValue("LabelColumn", parent);

                if (attachToAxis)
                {
                    s._attachedPlane = XmlSerializationSurrogate0.GetDirection(attachedAxis);
                }
                else
                {
                    s._attachedPlane = null;
                }

                if (nativeCall)
                {
                    // restore the cached values
                    s.SetCachedValues();
                    s.CreateEventChain();
                }

                return(s);
            }