//=====================================================================

        /// <summary>
        /// This is overridden to track view state for the inserted item
        /// </summary>
        /// <param name="index">The point at which to insert the item</param>
        /// <param name="item">The item to insert</param>
        protected override void InsertItem(int index, IImageArea item)
        {
            // If not added at the end, set the flag to indicate that all items should be serialized to view
            // state.
            if (index == this.Items.Count)
            {
                EWSoftware.ImageMaps.Web.Controls.ImageAreaBase a =
                    (EWSoftware.ImageMaps.Web.Controls.ImageAreaBase)item;

                if (trackViewState && !a.IsTrackingViewState)
                {
                    a.TrackViewState();
                }
            }
            else
            {
                saveAll = true;
            }

            base.InsertItem(index, item);
        }
        //=====================================================================
        /// <summary>
        /// This is overridden to track view state for the inserted item
        /// </summary>
        /// <param name="index">The point at which to insert the item</param>
        /// <param name="item">The item to insert</param>
        protected override void InsertItem(int index, IImageArea item)
        {
            // If not added at the end, set the flag to indicate that all items should be serialized to view
            // state.
            if(index == this.Items.Count)
            {
                EWSoftware.ImageMaps.Web.Controls.ImageAreaBase a =
                  (EWSoftware.ImageMaps.Web.Controls.ImageAreaBase)item;

                if(trackViewState && !a.IsTrackingViewState)
                    a.TrackViewState();
            }
            else
                saveAll = true;

            base.InsertItem(index, item);
        }
Beispiel #3
0
 /// <summary>
 /// This method can be used to set the focus to a specific image area
 /// </summary>
 /// <param name="area">The image area to which focus is given</param>
 /// <param name="setFocus">Specify true to make the image map the focused control, false to leave the
 /// focus alone.</param>
 /// <remarks>If the image map does not contain the image area specified, the focus is cleared.</remarks>
 /// <overloads>There are two overloads for this method.</overloads>
 public void Focus(IImageArea area, bool setFocus)
 {
     this.Focus(this.Areas.IndexOf(area), setFocus);
 }