public void InitializeAxisInformationList(ICoordinateSystem cs, AxisStyleCollection currentAxisStyles) { var dict = new Dictionary <CSLineID, CSAxisInformation>(); AxisStyles = new List <CSAxisInformation>(); foreach (var style in cs.AxisStyles) { if (!dict.ContainsKey(style.Identifier)) { dict.Add(style.Identifier, style); AxisStyles.Add(style); } } foreach (var axstyle in currentAxisStyles) { if (null != axstyle.CachedAxisInformation && !AxisStyles.Contains(axstyle.CachedAxisInformation)) { if (!dict.ContainsKey(axstyle.CachedAxisInformation.Identifier)) { dict.Add(axstyle.CachedAxisInformation.Identifier, axstyle.CachedAxisInformation); AxisStyles.Add(axstyle.CachedAxisInformation); } } } if (null != CurrentStyle && !dict.ContainsKey(CurrentStyle)) { var info = cs.GetAxisStyleInformation(CurrentStyle); AxisStyles.Add(info); } }