예제 #1
0
파일: MapView.cs 프로젝트: rolo2012/ui
        /// <summary>
        /// Returns the mapcontrols list.
        /// </summary>
        /// <value>The controls.</value>
        public void AddControl(MapControl control)
        {
            if (control == null)
            {
                throw new ArgumentNullException("control");
            }

            lock (_controls)
            {
                _controls.Add(control); // add to control list.
                control.AttachTo(this); // attach to this view.

                this.AddView(control.BaseView, control.BaseView.LayoutParameters);
            }
            this.NotifyControlChange(control);
            _mapView.TriggerRendering();
        }