private void _btnLegend_Click(object sender, EventArgs e)
        {
            LayoutLegend         lsb         = _layoutControl.CreateLegendElement() as LayoutLegend;
            List <LayoutElement> mapElements = _layoutControl.LayoutElements.FindAll(delegate(LayoutElement o) { return(o is LayoutMap); });

            if (mapElements.Count > 0)
            {
                lsb.Map = mapElements[0] as LayoutMap;
            }
            lsb.LayoutControl = _layoutControl;
            _layoutControl.AddElementWithMouse(lsb);
        }
 private void BtnLegendClick(object sender, EventArgs e)
 {
     _layoutControl.AddElementWithMouse(_layoutControl.CreateLegendElement());
 }