/// <summary>
        /// Searches for the MapServiceLayerLegend whose Children collection contains the
        /// specified layerLegend.
        /// </summary>
        /// <param name="layerLegend">The MapServiceLayerLegend of a MapService sublayer.</param>
        /// <returns></returns>
        public MapServiceLayerLegend FindContainer(MapServiceLayerLegend layerLegend)
        {
            if (Children.Contains(layerLegend))
            {
                return(this);
            }

            foreach (MapServiceLayerLegend childLayerLegend in Children)
            {
                MapServiceLayerLegend container = childLayerLegend.FindContainer(layerLegend);
                if (container != null)
                {
                    return(container);
                }
            }
            return(null);
        }
        /// <summary>
        /// Searches for the MapServiceLayerLegend whose Children collection contains the 
        /// specified layerLegend.
        /// </summary>
        /// <param name="layerLegend">The MapServiceLayerLegend of a MapService sublayer.</param>
        /// <returns></returns>
        public MapServiceLayerLegend FindContainer(MapServiceLayerLegend layerLegend)
        {
            if (Children.Contains(layerLegend))
                return this;

            foreach (MapServiceLayerLegend childLayerLegend in Children)
            {
                MapServiceLayerLegend container = childLayerLegend.FindContainer(layerLegend);
                if (container != null)
                    return container;
            }
            return null;
        }