bool _InsidePlotArea; //Boolean If true, draw legend inside plot area, otherwise // draw outside plot area (default). internal Legend(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p) { _Visible = false; _Style = null; _Position = LegendPositionEnum.RightTop; _Layout = LegendLayoutEnum.Column; _InsidePlotArea = false; // Loop thru all the child nodes foreach (XmlNode xNodeLoop in xNode.ChildNodes) { if (xNodeLoop.NodeType != XmlNodeType.Element) { continue; } switch (xNodeLoop.Name) { case "Visible": _Visible = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; case "Style": _Style = new Style(r, this, xNodeLoop); break; case "Position": _Position = LegendPosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "Layout": _Layout = LegendLayout.GetStyle(xNodeLoop.InnerText, OwnerReport.rl); break; case "InsidePlotArea": _InsidePlotArea = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl); break; default: break; } } }
static public LegendPositionEnum GetStyle(string s) { return(LegendPosition.GetStyle(s, null)); }