/// <summary> /// Overloaded constructor used create an instance of the AxisModel class during serialization. /// The public properties of this class are set by this contructor as they are obtained from the /// IAxis interface object passed as the parameter. /// </summary> /// <param name="ax">Specifies the IAxis interface object to be serialized.</param> public AxisModel(IAxis ax) { Position = ax.Position; AxisType = ax.AxisType; Origin = ax.Origin; Reversed = ax.Reversed; Labels = ax.Labels; MajorTickMarks = ax.MajorTickMarks; MajorGrid = ax.MajorGrid; MajorUnit = ax.MajorUnit; MinorTickMarks = ax.MinorTickMarks; MinorGrid = ax.MinorGrid; MinorUnit = ax.MinorUnit; LogBase = ax.LogBase; AxisLine = ax.AxisLine; LabelAlignment = ax.LabelAlignment; LabelAngle = ax.LabelAngle; Min = ax.Min; Max = ax.Max; Format = ax.Format; Title = ax.Title; OverlappingLabels = ax.OverlappingLabels; //styles Style = StyleSerializer.StyleToString(ax.GetStyle("_"), ax.Chart as IBrushConverter); MajorGridStyle = StyleSerializer.StyleToString(ax.GetStyle("_MajorGrid"), ax.Chart as IBrushConverter); MinorGridStyle = StyleSerializer.StyleToString(ax.GetStyle("_MinorGrid"), ax.Chart as IBrushConverter); TitleStyle = StyleSerializer.StyleToString(ax.GetStyle("_Title"), ax.Chart as IBrushConverter); }